Jump to content
BrainDen.com - Brain Teasers
  • 0


unreality
 Share

Question

VNA

VNA stands for Virtual Node Array, and is the setting for this game, which I based loosely off of Core Wars, an old programming game... but Redcode was pretty hard to understand IMO, I think VNA Code (which I have invented over the past two days) is better and easier to learn. You need no knowledge of Redcode or Core Wars to play this game.

Back to the game.

The VNA is like a computer memory space, one-dimensional, and filled with nodes. A node is like a line of programming code. Before the game begins, all of the VNA's nodes have the BLANK command, but when the game begins, two programs are put into the VNA at random locations. The programs designed by YOU, the players of the game! They retain their order and everything, they're just placed in at a random spot in the VNA, though considerably far away from each other.

Each node refers to itself as 0, while the next line is 1 and the previous line is -1. The VNA wraps around so it's like a loop of nodes.

So in the beginning of the game, both player's programs are put into the VNA, and then each player starts with one 'executor'. An executor starts at the beginning line of the player's program and then executes that node, then the next, etc.

In one round, Player 1 (P1)'s executor executes one node, and P2's executor does the same. Then in the next round, etc.

Using the SPLIT and MERGE commands, new executors can be made or deleted. Let's say P1 has 2 executors while P2 has 1. The game would proceed like this:

Round One

* P1's first executor

* P2's executor

Round Two

* P1's second executor

* P2's executor

etc. Each player can have up to four executors running at any one time.

The goal of the game is to destroy the opponent's executors and be the sole master of the Virtual Node Array! Note that once your initial executor starts running, you have no more impact in the game except to see the outcome.

So how to program in VNA Code?

First, the commands. Each node is essentially a command. Each command (except BLANK) is followed by three values: a,b,c. If not specified, they are assumed to be zero. I call the a/b/c values input vectors, and they can be either a number or a function (will get to functions next).

The commands:


COPY a,b	   copies line a into line b (overriding the current line b)

JUMP a		 jumps execution to line a

BOMB		   destroys the executor that executed this node

SPLIT a		creates a new executor which begins running at line a. Cannot create more than four

MERGE		  deletes the most recently created executor. Cannot delete the initial executor

EDITA a,b	  a is the line number, b is the new a value for that node

EDITB a,b	  a is the line nummber, b is the new b value for that node

EDITC a,b	  a is the line number, b is the new c value for that node

BLANK		  what the original VNA is filled with. You can use BLANK commands too, it's basically a "do-nothing" command. BLANKs cannot hold a/b/c values like other commands can


Note that there are no 'c' fields in usage, but I left the possibility open for both data storage and in case I add more commands later that need a third input value as well


So, a/b/c values are either numbers (usually line numbers, remember that each node refers to itself as line 0) OR functions. So what are functions?


The functions:


a(n)			returns the a value of the node at line n

b(n)			returns the b value of the node at line n

c(n)			returns the c value of the node at line n

add(m,n)		returns m+n

sub(m,n)		returns m-n

mul(m,n)		returns m*n

div(m,n)		returns m/n

mod(m,n)		returns the remainder of m/n

pow(m,n)		returns m^n

com(m,n,o,p,q)  compares m & n. If they are equal, returns o. If m>n, returns p. If n>m, returns q

exe()		   returns the number of executors that you have currently running

num()		   returns the number of lines in the VNA

That's all I've got right now, but I think it's enough. You can nest functions within functions, in case you were wondering - in fact I do that in my example program. I call it 'The Bomber'

COPY 3, 4

EDITB -1, add(b(-1), 1)

JUMP -2

BOMB

Whoa! What's that do? The COPY command copies line 3 (which would be the BOMB) into line 4 (just a BLANK before, now it's a BOMB too). So this part of the VNA looks like this now:

COPY 3, 4

EDITB -1, add(b(-1), 1)

JUMP -2

BOMB

BOMB

In the next round, the next line is executed. The command on this node is EDITB, which edits the b field of a certain line. That line is in EDITB's a field, which is -1, so it's editing the b field of the line right before it. The line is edited to adding the CURRENT b field value [b(-1)] with the number 1. Basically, this EDITB line is incrementing the COPY's b field by 1. So the new code looks like this:

COPY 3, 5

EDITB -1, add(b(-1), 1)

JUMP -2

BOMB

BOMB

The next line is JUMP -2, which sends the executor backwards 2 lines to the COPY node again - phew that was close, we almost hit the BOMB command!

So now the program runs all over again, except this time it copies the BOMB command to line 5 (the next BLANK). Thus, as the executor loops over these three lines, it spews out a chain of BOMBs to eventually march upon the opponent. That's why I call it the Bomber :D

This isn't the perfect Bomber - because it only spews a BOMB command every third round, and the BOMB only advances one node each time. Depending on the size of the VNA, the opponent could have destroyed you by the time you lay the tenth BOMB. One way is to, based on the number of lines in the VNA, skip a certain amount of lines to place the next BOMB.

I made this slightly more complicated program next, I call it the Bomb Evader:

SPLIT -3

JUMP com(exe(),1,4,1,1)

MERGE

EDITA -3, sub(a(-3),2)

JUMP -4

COPY 2, sub(a(-5),7)

JUMP sub(a(-5),8)

JUMP 0

It works by sending a secondary executor backwards toward the opponent, with the initial executor checking to see if it's still alive with exe(). When/if the secondary executor is killed, the executor copies the line 'JUMP 0' to that line and then jumps itself to the JUMP 0 line, thus staying in the same place while the opponent's BOMBs continue past, destroying the original program, looping back around, and killing the Bomber, while the Bomb Evader stays alive. This could fail, however, if the Bomber is, say, 4 lines long and did some math to make a BOMB every 5th line done so that if it looped back around (based on num()) it would avoid itself. Though it would also be unlikely to hit the JUMP 0

If you're interested in building your own battle program and warring with other people, post here :D The cool thing is that I can play too ;D

Link to comment
Share on other sites

  • Answers 197
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts

  • 0
You'll have to wait for swarm - it uploads on Taleisin's emulator now (I optimised some of the code) but, though it starts off well, doesn't finish the job. As you can imagine bugging it is proving quite a trial!

I've just sent unreality swarm which I've finally finished debugging! Don't mind who it goes up against, maybe one of UR's. I don't mind which: I'll beat them all....

"As you can see, my young apprentice, your friends have failed. Now witness the firepower of this fully ARMED and OPERATIONAL battle station!"

Link to comment
Share on other sites

  • 0
I've just sent unreality swarm which I've finally finished debugging! Don't mind who it goes up against, maybe one of UR's. I don't mind which: I'll beat them all....

"As you can see, my young apprentice, your friends have failed. Now witness the firepower of this fully ARMED and OPERATIONAL battle station!"

I like your idea for a program. Throwing all the functionallity into function instead of commands. I was going to try something simular but couldn't be bothered doing all the calculations.

Also my emulator did better than I expected in running it.

Edited by taliesin
Link to comment
Share on other sites

  • 0

I tested my Eviscerator vs your Swarm, and I was actually on the verge of beating you :P

But then the Swarm froze up my emulator... first of all, somehow it copied an actual function into the BOMB's c value, which is impossible, I think - mine evaluates the function to be copied into one number, which is entered. That's how the VNA works. But since it copied a chunk of text into the cvalue, I'm thinking it gave up and just plopped the rest of the function. Also I forgot to hand-edit your exe() function, cuz in mine I used a value of 1 or 2 inside to denote which player so when I enter the programs into the emulator I put a single input into exe(). After my computer is done rebooting after its freeze-up, lol, I'll enter the exe value and hopefully that will fix the weird m's that are just showing up within the functions

like this:

add(m,add(mod(etc...)

Do you know what an 'm' is doing in there? I couldn't figure out where it came from since I didn't know where the bomb's cvalue suddenly came from lol

My other comp should be rebooted by now, I'll try again

Link to comment
Share on other sites

  • 0

wait I found the random m's:

Swarm

JUMP 3;0;0

BOMB 0;0;0

SPLIT 51;0;0

COPY com(mod(c(-2),4),0,sub(div(sub(mod(c(-2),32),mod(c(-2),4)),4), 2),-2,-2);com(mod(c(-2),4),0,add(div(sub(mod(c(-2),32),mod(c(-2),4)),4),48),add(div

(sub(c(-2),mod(c(-2),32)),32),25),add(div(sub(c(-2),mod(c(-2),32)),32),25));0

EDITC -3;com(mod(c(-3),4),0,com(sub(mod(c(-3),32),mod(c(-3),4)),16,com(exe(),5,sub(add(

c(-3),1),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))

),add(add(sub(c(-3),mod(c(-3),32)),mod(c(-3),4)),16),add(c(-3),4)),com(mod(c(-3),4),1,c

om(exe(),5,com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3)

,mod(c(-3),32)),32.7),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),22

4),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod

(c(-3),32)),448),1600),mod(c(-3),32))),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),

com(mod(c(-3),4),2,sub(add(c(-3),3),mod(c(-3),4)),com(mod(sub(c(-3),mod(c(-3),32)),

1600),1376,sub(c(-3),mod(c(-3),4)),sub(c(-3),mod(c(-3),4)),com(mod(add(sub(c(-3),

mod(c(-3),32)),1024),1600),

160,add(mod(add(sub(m,mod(m,32)),224),1600),

mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),

mod(c(-3),32)),448),1600),mod(c(-3),32)))),0,0),0),0);0

JUMP com(mod(c(-4),4),2,-3,-2,-2);0;0

edit for Fool: sorry man, my emulator doesn't have any "if you rerun something x times quit" or anything, so you'll need to replace those m's with what they're supposed to be and stuff before I can do anything. I think they might be part of the problem, if not all of it, so once you get rid of those and replace with what it's supposed to be, re-post or re-PM the code so that I can run it again :D

Also, if you PM me with an in-depth description of how it works (I won't cheat, don't worry :P The Eviscerator is already set in stone) I think I could come up with a few ideas - if not new commands lol - to size it down a bit. Just because you didn't see any other options to do the same thing with the same level of efficiency doesn't mean I can't - I created VNA code after all ;D If you don't PM me I'll be forced to actual decipher it myself :D hehe

Edited by unreality
Link to comment
Share on other sites

  • 0
I tested my Eviscerator vs your Swarm, and I was actually on the verge of beating you :P

But then the Swarm froze up my emulator... first of all, somehow it copied an actual function into the BOMB's c value, which is impossible, I think - mine evaluates the function to be copied into one number, which is entered. That's how the VNA works. But since it copied a chunk of text into the cvalue, I'm thinking it gave up and just plopped the rest of the function. Also I forgot to hand-edit your exe() function, cuz in mine I used a value of 1 or 2 inside to denote which player so when I enter the programs into the emulator I put a single input into exe(). After my computer is done rebooting after its freeze-up, lol, I'll enter the exe value and hopefully that will fix the weird m's that are just showing up within the functions

like this:

add(m,add(mod(etc...)

Do you know what an 'm' is doing in there? I couldn't figure out where it came from since I didn't know where the bomb's cvalue suddenly came from lol

My other comp should be rebooted by now, I'll try again

Very sorry! I thought it was working. Could the C variable on the BOMB have overflowed? There's no way it should copy a function to the c variable.

I'll have another look, as there shouldn't be any m's left - they are my representation for the c value sotored in the BOMB.

edit: and I'll fix the exe() funcs - I did see that you changed that. I'll assume I'm player 1 :)

Edited by foolonthehill
Link to comment
Share on other sites

  • 0

this should be better:


JUMP 3;0;0
BOMB 0;0;0
SPLIT 51;0;0
COPY com(mod(c(-2),4),0,sub(div(sub(mod(c(-2),32),mod(c(-2),4)),4), 2),-2,-2);com(mod(c(-2),4),0,add(div(sub(mod(c(-2),32),mod(c(-2),4)),4),48),add(div(sub(c(-2),mod(c(-2),32)),32),25),add(div(sub(c(-2),mod(c(-2),32)),32),25));0
EDITC -3;com(mod(c(-3),4),0,com(sub(mod(c(-3),32),mod(c(-3),4)),16,com(exe(1),5,sub(add(c(-3),1),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),add(add(sub(c(-3),mod(c(-3),32)),mod(c(-3),4)),16),add(c(-3),4)),com(mod(c(-3),4),1,com(exe(1),5,com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),32.7),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32))),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),com(mod(c(-3),4),2,sub(add(c(-3),3),mod(c(-3),4)),com(mod(sub(c(-3),mod(c(-3),32)),1600),1376,sub(c(-3),mod(c(-3),4)),sub(c(-3),mod(c(-3),4)),com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32)))),0,0),0),0);0
JUMP com(mod(c(-4),4),2,-3,-2,-2);0;0
[/codebox]

I want to see what happens once then I'll give out the high level version so you can see what it does.

edit: codebox for rookie, :P

Edited by foolonthehill
Link to comment
Share on other sites

  • 0
Did you see my edit on post 155? Either way, I'll try the new code now :D

Yep. I think it was probably those darn 'm's. I'll PM you the high level version so you can decipher what it does. I'll be very impresed if you can get any more optimisations though...

You remember what we were saying about building an 'emulator killer'?! :D

Edited by foolonthehill
Link to comment
Share on other sites

  • 0

It still tried to copy a chunk of text instead of a number, and then froze it in the next round. Maybe you'll get better results on taliesin's emulator, but I don't think mine can handle it :P Or more likely there's a missing parentheses or some other error that's impossible to find

Which is why I'll try to re-code yours from scratch in a more presentable way. Wish me luck ;D

btw since I didn't end up battling anything with the Eviscerator, I'll save it for the next fight

Link to comment
Share on other sites

  • 0
It still tried to copy a chunk of text instead of a number, and then froze it in the next round. Maybe you'll get better results on taliesin's emulator, but I don't think mine can handle it :P Or more likely there's a missing parentheses or some other error that's impossible to find

Which is why I'll try to re-code yours from scratch in a more presentable way. Wish me luck ;D

btw since I didn't end up battling anything with the Eviscerator, I'll save it for the next fight

I love that it's my program that's flawed not the emulator! ;) It seems ok on Taliesin's and does what it's supposed to - can you work out where the copying text part comes in? Because that shouldn't be possible whatever I my program says (assuming there's no more 'm's in it!

I'm keen to see your improved version - it would be easy with several more lines, but since it's a 'copier' the length of the program is the most important thing. I am pretty certain that it can't be shortened and think that my mark 2 version optimises most of the calculations possible but please feel free to have a go.

The fact that com() always needs 3 output variables makes it quite hard. A simple com(a,b, action if a<=b, action if a>b) might have been better as it can be nested to differentiate a<b and a=b but I had to double up on a lot of code when I only wanted to emulate an if statement.

Good luck.

edit: I am pretty certain that the number of brackets and function arguments etc is correct now - excel can parse it (albeit in sections because it nests too deep)

Edited by foolonthehill
Link to comment
Share on other sites

  • 0
I love that it's my program that's flawed not the emulator! ;) It seems ok on Taliesin's and does what it's supposed to - can you work out where the copying text part comes in? Because that shouldn't be possible whatever I my program says (assuming there's no more 'm's in it!

I'm keen to see your improved version - it would be easy with several more lines, but since it's a 'copier' the length of the program is the most important thing. I am pretty certain that it can't be shortened and think that my mark 2 version optimises most of the calculations possible but please feel free to have a go.

The fact that com() always needs 3 output variables makes it quite hard. A simple com(a,b, action if a<=b, action if a>b) might have been better as it can be nested to differentiate a<b and a=b but I had to double up on a lot of code when I only wanted to emulate an if statement.

Good luck.

edit: I am pretty certain that the number of brackets and function arguments etc is correct now - excel can parse it (albeit in sections because it nests too deep)

So it works correctly on my emulator? I can turn debugging on if you want a closer look inside the evaultation of function..

I second your opion for the com function, and making a few argumants optional!

Link to comment
Share on other sites

  • 0
So it works correctly on my emulator? I can turn debugging on if you want a closer look inside the evaultation of function..

I second your opion for the com function, and making a few argumants optional!

seems fine, but debugging already seems to be turned on - and I have no idea what C, D, R and all the rest of your debugging symbols are!

Do you have a program to try against it - here it is:


JUMP 3;0;0
BOMB 0;0;0
SPLIT 51;0;0
COPY com(mod(c(-2),4),0,sub(div(sub(mod(c(-2),32),mod(c(-2),4)),4), 2),-2,-2);com(mod(c(-2),4),0,add(div(sub(mod(c(-2),32),mod(c(-2),4)),4),48),add(div(sub(c(-2),mod(c(-2),32)),32),25),add(div(sub(c(-2),mod(c(-2),32)),32),25));0
EDITC -3;com(mod(c(-3),4),0,com(sub(mod(c(-3),32),mod(c(-3),4)),16,com(exe(1),5,sub(add(c(-3),1),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),add(add(sub(c(-3),mod(c(-3),32)),mod(c(-3),4)),16),add(c(-3),4)),com(mod(c(-3),4),1,com(exe(1),5,com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),32.7),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32))),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),com(mod(c(-3),4),2,sub(add(c(-3),3),mod(c(-3),4)),com(mod(sub(c(-3),mod(c(-3),32)),1600),1376,sub(c(-3),mod(c(-3),4)),sub(c(-3),mod(c(-3),4)),com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32)))),0,0),0),0);0
JUMP com(mod(c(-4),4),2,-3,-2,-2);0;0
[/codebox]

Can you tell from your debugging output where the error might be (if there is one ;) !)

Link to comment
Share on other sites

  • 0

If we simplified com, which would we simplify? I mainly use "=" and ">", the first two options, as the same, with "<", the third option, as different, though in other cases I use "=" as one thing and "<" and ">" as the same. I rarely have all three different, but they're all necessary because you don't know which combination you'll have. If you knew that one of them would never ever happen, you could just put in "0" instead of whatever you would want it do IN CASE that happened, if you knew that wouldn't happen.

We can't simplify com, but I could make two more functions:

equ(w,x,y,z)

Compares w & x. If equal, y, if not equal, z

geq(w,x,y,z)

Compares w & x. If greater OR equal, y, if less, z

leq(w,x,y,z)

Compares w & x. If lesser OR equal, y, if greater, z

And also remove the 'num()' function, it's not needed. If we're ever doing a VNA size other than 200 and max size other than 30, all will be notified. No more num() function

What do you guys think about the above function ideas?

Link to comment
Share on other sites

  • 0

Fool: off the top of my head I can think of one way to make your program more efficient, reducing it by 1 line and also reducing by 1 the number of rounds to any step, but the change is minor to the overall appearance and it would still have the same nested functions. After all your hard work on the Swarm, I have no doubt that it's compact as it can be in all other regards, though maybe the new functions I proposed above can help (equ, geq, leq - basically shorthand coms).

Link to comment
Share on other sites

  • 0
seems fine, but debugging already seems to be turned on - and I have no idea what C, D, R and all the rest of your debugging symbols are!

Do you have a program to try against it - here it is:


JUMP 3;0;0
BOMB 0;0;0
SPLIT 51;0;0
COPY com(mod(c(-2),4),0,sub(div(sub(mod(c(-2),32),mod(c(-2),4)),4), 2),-2,-2);com(mod(c(-2),4),0,add(div(sub(mod(c(-2),32),mod(c(-2),4)),4),48),add(div(sub(c(-2),mod(c(-2),32)),32),25),add(div(sub(c(-2),mod(c(-2),32)),32),25));0
EDITC -3;com(mod(c(-3),4),0,com(sub(mod(c(-3),32),mod(c(-3),4)),16,com(exe(1),5,sub(add(c(-3),1),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),add(add(sub(c(-3),mod(c(-3),32)),mod(c(-3),4)),16),add(c(-3),4)),com(mod(c(-3),4),1,com(exe(1),5,com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),32.7),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32))),sub(add(c(-3),2),mod(c(-3),4)),sub(add(c(-3),2),mod(c(-3),4))),com(mod(c(-3),4),2,sub(add(c(-3),3),mod(c(-3),4)),com(mod(sub(c(-3),mod(c(-3),32)),1600),1376,sub(c(-3),mod(c(-3),4)),sub(c(-3),mod(c(-3),4)),com(mod(add(sub(c(-3),mod(c(-3),32)),1024),1600),160,add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),224),1600),mod(c(-3),32)),add(mod(add(sub(c(-3),mod(c(-3),32)),448),1600),mod(c(-3),32)))),0,0),0),0);0
JUMP com(mod(c(-4),4),2,-3,-2,-2);0;0
[/codebox]

Can you tell from your debugging output where the error might be (if there is one ;) !)

If it does what you expect it to do there is no error.. :D

oh.. :( I thought I turned them back off .... check... woops forgot to upload afterwards :(

Link to comment
Share on other sites

  • 0

I ran a test against my Eviscerator, Swarm at line 1, Eviscerator at line 99 (entirely by chance!) and the Eviscerator won in the second round :P Lol so I redid it (this time the Ev got placed at 162), but then in the usual first copy, the Swarm copied a huge chunk of text. I copied what it resulted in and compared with the original code, and came the conclusion that my emulator coughed out at one point and copied the rest in, however it wasn't exactly the same, some numbers seemed to have been reduced before it died (quite a lot actually, but the Swarm had too many nested functions for it to handle). The only other possibility was that there was a faulty parentheses or comma in the Swarm somewhere, but after taliesin said it works fine on his, it just means my emulator can't handle it :D

So we'll have to do any Swarm runs in taliesin's ;D In the future lets try not to create uberfunctions unless absolutely necessary, hehe

btw taliesin do you mind reposting the link to your emulator?

Also check out posts 155 & 156

And I'm planning a Tournament, bracket-style, where each person must enter a program. Thus it must be able to fight many different types of opponents. It would be unreality-run, which means the program needs to work on my emulator (:P) and all programs would be PMed to me (don't worry about me cheating, I haven't changed a single line of the Eviscerator's code since I made it a few days ago). However I would want 4 or 8 people involved, maybe 6 with byes? Not sure. Also, for each match, there will be 5 games each with a different random starting point, in case a program gets lucky.

But for that we need everyone involved in this to PM out and get more people to join :D I know that vimil is interested, and we need to get Mekal and Frozen back in, and Sinistral, and Ben Law maybe, and anyone else ;D

In the meantime if anyone wants to challenge my Eviscerator they can, though I'm hesitant to give out the code

Link to comment
Share on other sites

  • 0
I ran a test against my Eviscerator, Swarm at line 1, Eviscerator at line 99 (entirely by chance!) and the Eviscerator won in the second round :P Lol so I redid it (this time the Ev got placed at 162), but then in the usual first copy, the Swarm copied a huge chunk of text. I copied what it resulted in and compared with the original code, and came the conclusion that my emulator coughed out at one point and copied the rest in, however it wasn't exactly the same, some numbers seemed to have been reduced before it died (quite a lot actually, but the Swarm had too many nested functions for it to handle). The only other possibility was that there was a faulty parentheses or comma in the Swarm somewhere, but after taliesin said it works fine on his, it just means my emulator can't handle it :D

So we'll have to do any Swarm runs in taliesin's ;D In the future lets try not to create uberfunctions unless absolutely necessary, hehe

btw taliesin do you mind reposting the link to your emulator?

Also check out posts 155 & 156

And I'm planning a Tournament, bracket-style, where each person must enter a program. Thus it must be able to fight many different types of opponents. It would be unreality-run, which means the program needs to work on my emulator (:P) and all programs would be PMed to me (don't worry about me cheating, I haven't changed a single line of the Eviscerator's code since I made it a few days ago). However I would want 4 or 8 people involved, maybe 6 with byes? Not sure. Also, for each match, there will be 5 games each with a different random starting point, in case a program gets lucky.

But for that we need everyone involved in this to PM out and get more people to join :D I know that vimil is interested, and we need to get Mekal and Frozen back in, and Sinistral, and Ben Law maybe, and anyone else ;D

In the meantime if anyone wants to challenge my Eviscerator they can, though I'm hesitant to give out the code

Would you like me to post my function evalution code so you could get dome ideas from it?

I should be at http://taliesin.net78.net/Brainden/VNA/

Though it appears that Debugging is left on.. :( Ill turn it abck off when I get home.

I also suggest we add some binary masking function

Making all inputs and outputs decimal ( or prehaps binary and a btod and dtob fuinctions ( binary to decimal) )

band( a,b) return binary a "and" b

bor( a,b) returns binary a "or" b

bxor (a,b) returns binary a "xor" b ( exclusive or)

bnot( a) returns binary "not" of a.

Link to comment
Share on other sites

  • 0
I thought of adding binary functions but then decided they were unnecessary for the coding... that's what the com function is for, though we can simplify the com's unwanted parameters by adding the equ, geq and leq functions if you want

I think you dont need less than or equals.

Have "equals", "greter than", and "greater than or equals".

I think that swarm is trying to do it BitMasking from the quick look that I have had. If this ic correct the bitmaks /binary fuctcions will reduced the code alot.

Link to comment
Share on other sites

  • 0

Yes but not traditional base-2 bitmasking, from Fool's description. If you want to compare things, you can use com and com-like functions

so we'll add equ, geq and leq, and remove num. Your saying that we need "greater than" AND "greater than and equals" is actually the same thing, unless specifically different things, then use com. And if we add geq we should add leq

So: equ, geq, leq :D

Link to comment
Share on other sites

  • 0

I've been trying to make sense of taliesin's emulator but it just doesn't make any sense to me - does it update one VNA thing? (that's what mine does), or does it create the new status off to the right? It doesn't seem to be working properly from what I can tell, yet somehow it must yield the correct results because we matched them against each other and taliesin's got the same results of who won and what round. Also, when you enter a number, is that how many rounds it does? Where is this recorded? Why is there nothing from 0 to 10 and 190 to 200, but blanks elsewhere? What are the "-1", "0" or "1"s before the code line? I assume those to be the player number, but actually players do not "own" code. They add programs into the VNA at the beginning of the game, and get put at that line #, but after that, nobody 'owns' code. If you run into code created by another person, you still execute it, there's no difference.

Sorry about all these questions, I'm just having a hard time understanding your emulator :blink: Some help would be appreciated :D

Link to comment
Share on other sites

  • 0

So here you go, this is swarm:


JUMP 3
BOMB 32j+4i+k
SPLIT X+1
COPY if k=0: i-2; i-2+X
k=1: -2; j-N/2+X
k=2: -2; j-N/2+X
k=3: -2; j-N/2+X
EDIT if k=0: if i=4: if exe()=5 k=1 else k=2
i>4: i=4
i<4: i=i+1
k=1: if exe()=5: if mod(j+7+N/2,N)>=5 j=mod(j+7,N) else j=mod(j+14,N)
exe()>5: i=j=k=0
exe()<5: k=2
k=2: k=3
k=3: if mod(j,N)=>N-7: k=0
mod(j,N)<N-7: if mod(j+7+N/2,N)>=5 j=mod(j+7,N) else j=mod(j+14,N)
JUMP if k=4: -3 else -2
[/codebox]

i: program copy position (0,1,2,3,4)

j: bomb copy position (anything)

k: operation mode: 0=copy prog, 1=copy complete but exe() full, so copy bomb. 2=split, 3=wait and copy bomb, then return to k=0

N: program space (50)

X: swarm jump (50)

It has 4 'modes' stored in k, to control the type of COPY action taking place. Though I use 2-bit masking for k, I have to use 3-bits for i as there's five lines to code.

Basically, it's a replicating, self-repairing bomber that aims to occupy 20 lines throughout the VNA and bomb the rest. If a replicated emulator gets killed, it's code is re-copied and restarted. If everything's running fine and there are 5 exectuors running, then it just bombs everywhere else.

The size of the compiled code is huge because of the multiple com() outputs as I said previously and some sort of bitmask would be useful rather than mod(), though I don't think you need too many extra functions. leq and geq are the same aren't they? leq(w,x,y,z) = geq(-w,-x,y,z)

UR, you said you could knock a line of code off. Which one, as I don't repeat any commands, so removing one must remove some functionality, or did I miss something?

Link to comment
Share on other sites

  • 0
Yes but not traditional base-2 bitmasking, from Fool's description. If you want to compare things, you can use com and com-like functions

so we'll add equ, geq and leq, and remove num. Your saying that we need "greater than" AND "greater than and equals" is actually the same thing, unless specifically different things, then use com. And if we add geq we should add leq

So: equ, geq, leq :D

I think we should leave num in, to make things scaleable.

I've been trying to make sense of taliesin's emulator but it just doesn't make any sense to me - does it update one VNA thing? (that's what mine does), or does it create the new status off to the right? It doesn't seem to be working properly from what I can tell, yet somehow it must yield the correct results because we matched them against each other and taliesin's got the same results of who won and what round. Also, when you enter a number, is that how many rounds it does? Where is this recorded? Why is there nothing from 0 to 10 and 190 to 200, but blanks elsewhere? What are the "-1", "0" or "1"s before the code line? I assume those to be the player number, but actually players do not "own" code. They add programs into the VNA at the beginning of the game, and get put at that line #, but after that, nobody 'owns' code. If you run into code created by another person, you still execute it, there's no difference.

Sorry about all these questions, I'm just having a hard time understanding your emulator :blink: Some help would be appreciated :D

Every column is a round. You can choose how many rounds to calculate at a time ( up to 500).

So if you choose 10 rounds the default. It will have a table with 200 rows ( one for each node starting with 0), the initial "dump of the memory". THe collumn labelled "1" is after 1 rounds, 2 after 2 rounds etc.. When it gets to the 10th rounds, this is also shown first on the next page (so differences are easly identified).

There is a slight flaw at the moment for long lines where the text goes onto 2 lines. The node position indication does not update height to reflect this. And from what I am told, I have left function debugging turned on.

There is a number "0", "1" prefixing each line to show which player was the last to execute/modify the Node. This is used to colour the grid ( to help see changes/monitor programs easly). I can turn the colour coding/prefix number off. Lines will have a value of -1 ( been no player) if they havent been touched from the start.

Hope this helps explain a little better. I plan of making the colums line up when I get time, as you know I have been studing most of this week, so havent had a lot of time to fix all the user issues.

Link to comment
Share on other sites

  • 0

Ah, okay... I think I see now. Thanks :D

Fool:

get rid of the first three lines (JUMP, BOMB, SPLIT) and then re-place the BOMB and SPLIT after the other lines, so that the COPY is the first line. You'll have to change some of the linepointers to point to the new BOMB instead of -3, and make it SPLIT 47 or 48 or 46 or whatever it is instead of SPLIT 51, etc, but those are minor changes, and you get rid of the pesky JUMP 3 in the beginning which wastes a line and a round ;D

Edited by unreality
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...