Jump to content
BrainDen.com - Brain Teasers
  • 0


unreality
 Share

Question

VNA 2.0

VNA 2.0 is a game of epic cybernetic warfare - it's easy to learn, but from its simple rules comes a lot of thrilling complexity and hardcore battling. In this game of wits and passionate skill, your job is to design a killer program that can destroy its foes in a virtual environment where only one program can emerge victorious. During the actual battle, you play no part (it's run by my emulator) - it's up to your program! You can only wait for the results as two programs duel it out for control of the VNA...

***

Introduction

***

This is an improvement over an earlier game I made (here on Brainden), called VNA. It's a game that involves a cyber-environment called the VNA (which stands for Virtual Node Array), which is just a list of 200 lines of code. The code is written in VNAC (VNA Code), which I've devised based off of an ancient game known as CoreWars, and tweaked to be better and easier to learn & optimize. For VNA 2.0, I've made some changes to allow accessibility and easy learning for people who have never done an ounce of programming in their life.

In the VNA, each of the 200 lines is called a 'node' (thus the name 'Virtual Node Array'), although I use 'line' and 'node' interchangeably, and each node contains exactly one command and then three parameters (a,b,c) that the command uses as input. The parameters are separated by semicolons.

Most commands do not use all three parameters, so the extra parameters can have any value, it doesn't matter (the default is 0). Some programs may use excess values to store data.

The most basic type of command is BLANK 0;0;0, and the VNA begins with all 200 lines filled with these BLANK commands.

Then two players enter the VNA. Each player submits a program with the aim of destroying the enemy program. The two programs get entered into the VNA at random starting points, overwriting the BLANKs that they are copied over. Each program can be a maximum of 40 nodes long, thus the closest two programs can be is 40 nodes away.

[Note: the programs retain their order. You could have a 20-line program that gets copied onto line, say, 57. Thus your program will replace lines 57 through 76. If the opponent's program was 10 lines and got placed on line 112, their program would occupy lines 112 through 121]

After the programs have been copied into the VNA, the battle begins!

The game progresses in rounds. Each player has a 'pointer', which starts out at the first line of code of the player's program, wherever that may be in the VNA. In each round, player A's pointer runs one line of code (one 'node'), and then player B's pointer runs one node. After a pointer runs a node, it moves itself forward 1 node in preparation for next round [but each round, each pointer only runs ONE node, no exceptions].

[For example, take the previous Note - your program got placed at line 57 and occupied lines 57 through 76. Thus your pointer begins at line 57. Your opponent's program started at line 112, so your opponent's pointer begins at line 112. On the first round, if you go first, your pointer runs line 57. Then your opponent's pointer runs line 112. On the second round, your pointer would run line 58, and your opponent's would run line 113. On the third round, you would run line 59 and your opponent would run line 114. etc. Pointers will always increment by 1 after they are finished executing a command, unless otherwise specified!]

A pointer is destroyed when it executes a BOMB command, and the other player wins!

***

Nodes & Commands

***

So how does VNA Code work? It is very easy to learn! Each node has a simple format:

CMND a;b;c

a command name followed by a space followed by the parameters, which are separated with semicolons.

Each command does a specific action, using the parameters as its input. Here is a list of commands:


COPY a,b copies line a into line b (overriding the current line b)
JUMP a jumps the pointer to line a
BOMB destroys the pointer that ran this node
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
EDITX a,b,c a is the line number, b is the new value, c is 0/1/2 to denote a/b/c to change
BLANK what the original VNA is filled with. You can use BLANK commands too, it's basically a "do-nothing" command
EDITI a,b,c a = line number, b is how much is added to the current value, and c is 0/1/2 to denote a/b/c to change. 'I' stands for increment
SHIFT a,b,c copies line a into line b, then jumps pointer to line c
PCOPY a,b copies only the command part of line a into the command part of line b (stands for "partial copy")
SWAP a,b switches line a & line b (happens immediately)
[/codebox]

Before I go on, let me clarify EDITX and EDITI. The a & b parameters of EDITX are the same as the a & b parameters of EDITA or EDITB or EDITC. That is, the 'a' parameter designates the line number to edit, and the 'b' parameter represents the new value. However EDITX also utilizes the 'c' parameter. The c parameter can be either 0 or 1 or 2. Zero means that it is editing the line's a-param (as per EDITA). 1 means that it's editing the b-param (as per EDITB), and 2 means the c-param (as per EDITC). You wouldn't use EDITX if you knew you would always be editing a specific parameter... you would only use EDITX if the actual parameter you were editing was going to change too.

EDITI is the same thing as EDITX, except that the 'b' parameter is different: instead of representing the NEW value, it represents what is going to be added to the current value [just a shortcut I made because a common use of EDIT is to increment a parameter]

So how do you represent a line number?

The current line is always seen as 'line 0', the next line is 'line 1', the line after that is 'line 2', etc. The line BEFORE the current line is referred to as '-1', the line behind that being '-2', etc. Because of this, there is no absolute definition of line number, and the VNA wraps around as if it were an infinite loop, so line 200 or 400 or -600 is the same thing as line 0 (which is the current line).

For example, say your program is this:

COPY 0;1

when the pointer runs this node, it copies the current line (0) into the next line (1), and looks like this:

COPY 0;1

COPY 0;1

remember that the pointer increments itself each round, so next round it will run the SECOND node, which is also "COPY 0;1", and thus this program is basically an infinitely-repeating program that cannot die and cannot kill anything. After five iterations:

COPY 0;1

COPY 0;1

COPY 0;1

COPY 0;1

COPY 0;1

...etc

[[i]Note: technically, it should be COPY 0;1;0, because even though the c-parameter is not used, it still should be shown[/i]]

***

Parameters & Functions

***

So what can you use for parameters? You already know that you can put numbers in, but usually you want to have a function: a function is something, like add(5,2), that takes in input and produces an output. For example, add(5,2) will add 5 and 2 (5 & 2 are the input) and output the number 7. Functions will always churn out a number as output, and for input, they will accept either numbers or more functions. For example:

add(5,add(3,2))

will add 5 to the addition of 3 and 2, thus the output of that whole thing will be 5+(3+2) or 5+5 = 10

There is no 'official' limit to the number of functions you can have nested within other functions, but at a certain point it may clog up my VNA emulator, and usually there's no need for such uber-nesting :D

So what are the functions? [btw, a fancy name for "output" is "return". For example, add(7,2) returns 9]

[codebox]
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
log(m,n) returns log (base m) of n
abs(n) returns the absolute value of n
int(n) returns the integer part of 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
equ(m,n,o,p) compares m & n. If they are equal, returns o. Otherwise, returns p
geq(m,n,o,p) compares m & n. If m>n or m=n, return o. Otherwise, p
leq(m,n,o,p) compares m & n. If m<n or m=n, return o. Otherwise, p
nzero(n) if all three parameters of line n are 0, returns 0. Otherwise, returns 1
rand(m,n) returns a random integer from m to n, including m&n. 'n' must be greater than 'm'

As you can see, functions are pretty useful for evaluating data and deciding what to do.

***

That's It!

***

That's all you need to know! Simple, right? You may not think so yet, but it actually is. With the above stuff, you can make some awesome programs. Take this, for example:

COPY 3;40;0

EDITI -1;3;1

JUMP -2;0;0

BOMB 0;0;0

Believe it or not, this simple thing is actually a powerful program. Let's analyze what it does, line by line:

COPY 3;40;0

Okay, 'COPY a,b' copies line a into line b, overriding the current line b.

a=3

b=40

So line 3 is the line three lines forward from 'COPY'. This is the 'BOMB' line! The 40 means it copies the BOMB line into a node 40 nodes forward from the current line. Note that 40 is the minimum distance the two programs can be apart from each other, and thus the first possible space that the opponent's program could be on.

After running the COPY line, the new VNA state would be this:

COPY 3;40;0

EDITI -1;3;1

JUMP -2;0;0

BOMB 0;0;0

...

... (36ish BLANK commands would be here, I just don't have the space ;D)

...

BOMB 0;0;0

Simple so far! Next, the EDITI command. It edits line -1, which would be the COPY line, and it edits the b-parameter of the COPY line because the c-parameter of the EDITI line is 1, which corresponds with 'b'. So 3 means that the b-parameter is incremented by 3. Thus, the new copy line looks like this:

COPY 3;43;0

in other words, the EDITI command added 3 to the COPY line's b-parameter, turning 40 into 43

The next line is JUMP -2, which sends the pointer back 2 lines, to the COPY line. That means the next line that the pointer will run is the COPY line... the COPY line which was modified. Now the COPY line will copy the BOMB 43 spaces forward, instead of 40 like last time. Each iteration of the program will churn out another BOMB another 3 spaces forward!

As you can see, the BOMB command is part in the program but is never actually run by the program (unless it gets corrupted by the enemy prpogram), just copied across the VNA in an attempt to destroy the opponent

This type of program is called a "Bomber", and is one of the simplest possible forms of Bombers. Other Bombers may have defense mechanisms built in (to stop if it gets close to bombing itself), or better methods for efficiency, etc

So I'm going to start out VNA 2.0 with an "Opening Day Tournament", in which I need 8 battle programs submitted to me to compete in a bracketed tournament format.

If you have any questions about VNA or VNA Code, feel free to PM me!

I call this one 'the Hopper':

COPY 0;add(a(0),c(0));170

EDITI -1;1;0

JUMP com(a(-2),3,168,168,-2);0;0

It works by copying all three lines of itself 170 spaces forward, then when that is complete, jumping itself to the new copy 170 nodes forward and doing it all over again. The Hopper is very versatile and extremely hard to kill. After just 9 rounds it has sent itself to the next location. However the Hopper has its setbacks, and the major one is that it relies on the opponent bombing themselves... the only way that a Hopper can actively kill the enemy is if it (by luck) overwrites key parts of the enemy's program that causes it to completely mess up and possibly hit a BOMB

This is an even simpler form of the Hopper:

SHIFT 0;170;170

It does what the Hopper does with one third the nodes and one ninth of the total rounds it takes! This Hyper-Hopper is extremely hard to kill (a BOMB has to nail right on top of its new location right before it runs it and before it goes elsewhere), but of course it has no ability to kill the opponent, and could only win if the opponent tears themselves apart.

This one is a bit more complex, but more efficient than a simple bomber. It searches for nodes that have nonzero parameters (and thus probably at or near the enemy's program) and then bombs the area. Meanwhile it takes advantage of the new SHIFT command I added to splatter bombs around at the same time as jumping with JUMP

SHIFT 3;40;equ(nzero(b(0)),0,1,4)

EDITI -1;5;1

JUMP -2;0;0

BOMB 0;0;0

EDITI -4;1;1

COPY -2;b(-5);0

JUMP -2;0;0

This program can be improved upon, of course. It has no defense mechanisms that check to see if it's getting close to bombing itself and jump it to a next step which does something different. It also becomes an inefficient 1-node-at-a-time bomber in the last three lines. You can help yourself learn about VNA by adding onto this program and making it better

Spoiler for my best on the above:

Much more efficient, 5 lines not 7 and runs way less of them, going through iterations faster and with more accuracy. Also reduces function lag by evaluating nzero and taking out the equ around nzero (see later when I explain nzero). Basically the big thing in the c-parameter of the SHIFT command evaluates the line denoted by its own b-parameter, checks if all of its parameters are zero. If so, back one. If not, up 2

The Hunter

EDITI 1;5;1

SHIFT 1;40;equ(a(b(0))+b(b(0))+c(b(0)),0,equ(a(b(0)),b(b(0)),equ(c(b(0)),0,-1,2),2),2)

BOMB 0;0;0

EDITI -2;1;1

SHIFT -2;sub(b(-3),3);-1

I call this one 'the Liberator'. It's a devastatingly simple and powerful program that takes advantage of the new SHIFT command and random function:

SHIFT 1;rand(40,160);0

BOMB 0;0;0

The rest I've made for VNA 2.0 so far are well-thought out warrior programs that I would use in a battle and not post here :D

If you understand how it all works, and can decipher programs... but have no idea where to start in making your own, then...

Make sure you have a clear goal on what you want your program to do (this is probably the most important step). Once you have a definite idea on how you want it to work, start to think about what commands you could use to make that happen in the best way...

If you want to know about things you cannot do that cause infinite loops,

COMMANDNAME b(0);a(0);7

Look at this. It's a-param references it's b-param, which references it's a-param!! I call this a 'paradox node'

COMMANDNAME a(1);2;25

COMMANDNAME a(-1);36;0

Same thing. Or it could be a-to-b like this:

COMMANDNAME b(1);2;25

COMMANDNAME 3;a(-1);0

or you could have three nodes that work this way, or four, or five! :o The possibilities are endless! The paradox nodes don't have to be next to each other either, of course

~~

The second kind is this:

COMMANDNAME a(0);8;15

You can NEVER have a(0) in the 'a' parameter, b(0) in the 'b' parameter, or c(0) in the 'c' parameter! (Or anything that equates to 0)

Note that nzero(n) = equ(a(n)+b(n)+c(n),0,equ(a(n),b(n),equ(c(n),0,AZ,NZ),NZ),NZ)

Where AZ is the result if line n has all-zero parameters, and NZ is the result if line n has at least one nonzero parameter. I didn't actually program nzero as a function in my emulator, I just added that to help you out - if I see a use of nzero, I'll replace it with the above longer version and use 0 for AZ and 1 for NZ... but the longer version is better for you to use raw because you can make the AZ and NZ anything you want that suits the specific purpose

The modulus is your friend

mod(a,b) = a % b, or "a modulo b" or "the remainder of a/b"

The function mod(x,3) will always produce a number that is either 0, 1 or 2, regardless of the value of x. A multiple of three (such as 33) will produce 0. One over a multiple of three (such as 34) will produce 1. Two over a multiple three (such as 35) will produce 2. For example:

mod(17,3) = 2

This is extremely useful in the 'c' parameter for the EDITX or EDITI commands, where a 0/1/2 value is required to specify a/b/c to edit. Using the mod function in combination with other values will allow you to manipulate that in a more complex/efficient program that uses a single EDITX or EDITI to do all of its editing

com is even MORE your friend!

The function I use most is probably com, though in VNA 2.0 with the addition of com's sister functions (equ, geq and leq) you can make your coms look simpler. Com just has more options, but when you know how you want to compare two things, using one of the other three will make your program less cluttered by removing the fifth input value (otherwise no actual advantage).

The command I almost always pair 'com' with is JUMP (or also the c-value of SHIFT) to tell it where to jump to in the program. Thus my JUMP commands act as switching stations that take in info, analyze with 'com' (or its sister functions) and then jump to the desired location

Efficiency is key

When you can use one line to do multiple things, do it! Each round, only one node is ran by your pointer, so you want to be as efficient as possible and make your actions take up the least amount of time to complete. For example, the SHIFT command I added in 2.0 allows for simultaneous copying and then jumping, with one node. So if you ever have a situation where you need to copy and then jump, SHIFT is the command for you.

Another tip for efficiency is placing any BOMB command your program might have at the end (or in middle if you're guaranteed to not run into it) of the code, and then reference it from earlier.

Integers and decimals

int(n) gives the integer part of n, for example int(5.78) = 5, though if you wanted just the .78 part, just do sub(n,int(n))

Plan for eventualities!

Make sure you have a backup plan if your program's initial goal fails! If you are a Bomber, when you jump back to re-bomb (if yours works like that), use a com with the JUMP to make sure that the bombs aren't getting too close to home. Creating a program that is capable of doing multiple tasks and planning for various types of enemy programs is a good idea :D Especially in the Tournament Game I'm going to start, where your program must be able to vanquish different kinds of foes

Editing input values

You may have noticed there are no commands for editing input values of functions... that's because it's just not feasible to do without unnecessary complications and complexities.

Instead, there is an efficient, elegant and much easier solution... if you have an input value of a function (no matter how nested it is within other functions, doesn't matter) that you know you want to change, just use in place of it one of these functions: a(n), b(n) or c(n), pointing to an unused parameter of a line. For example, if the previous line is a JUMP command, which doesn't use its b or c parameters, you could use b(-1) or c(-1) to reference one of those unused parameters of the JUMP command, which is where you would store the value which you could then easily change with an edit command.

I also do this when I want to increment, say two different values, by the same amount. I only use 1 round to increment ONE of those values, and have the other value piggyback off of the first and reference it. For example, if two values start at 0 and 7, and every xth round I want to increment them both by 1, I just increment the first one, and have the 7 instead be add(7,v) where v is the reference to the first value (such as a(3) or something similar). This saves a lot of efficiency!! :D

The random function...

rand(m,n) is special in that given the same two input values, the output can (and usually will) differ. Every time rand is evaluated by the VNA, it will return a different value. So when is it evaluated?

* when the node which it is a part of is ran by any pointer

* when a(n), b(n) or c(n) is used to reference the parameter [a, b or c] in which the 'rand' is used

* when EDITI is used to increment the parameter that the 'rand' is part of. EDITI just uses a shortcut of add(x,i) where x is the current value and i is the amount to increment by. Thus in this case, when an operation is performed on rand (such as adding to it, subtracting, etc), it fixes the value, because a(n) or b(n) or c(n) evaluate the current value of the whole parameter (including a random output if a 'rand' is there), and thus if you add something to that, it creates a fixed number, and if you plug that fixed number back into the parameter using EDIT, it is just a number now

** the same is true of all functions. For example, you could have a nested function system that continually evaluates the line 80 in front and adds all three of its parameters together [something like add(a(80),add(b(80),c(80))) ...], but when you use a(n), b(n) or c(n) on the parameter that contains that function, it evaluates it for the CURRENT case, into a fixed value - so if you plug that fixed value back into the parameter (after, say, incrementing it or something) it is no longer a function but a fixed number

So keep that in mind when using rand :D

So if you're interested, feel free to PM me about the game and submit your program today ;D I'm hoping to get 8 people for the Opening Day Tournament :P

Link to comment
Share on other sites

  • Answers 112
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

Recommended Posts

  • 0

Sorry for not getting back to you about this, UR. Have been very busy this week, but have now had a chance to read the rules and am in.

There don't seem to be too many changes from v1, except that you took away my favourite function: SPLIT. Looks like there's not going to be a new version of 'swarm' to break your emulator then! SHIFT looks interesting...and glad to see rand() has gone - all battles should be repeatable.

Will get on to something this evening and presumably we then PM the code to you again?

Link to comment
Share on other sites

  • 0

Suggestions with respect to the tournament format.

1. The first move gives some advantage. So each pair of cyborgs should battle twice, alternating the first move.

2. The best format to determine the strongest cyborg is round robin tournament. For 8 participants, 2 matches each pair that would translate into 8*7=56 matches.

3. If that's too much, then consider swiss system:

1st round:

1 vs 5; 2 vs 6; 3 vs. 7; 4 vs 8 (two matches each.)

After that, group the participants according to their score: 1st group -- those with 2 points; 2nd group those with 1 pont, and 3rd group with 0 points. Then match them again within each group. Make sure each gets a different opponent (not same match as in any of the previous rounds). If that's impossible within the same group, and/or when there are odd number of participants in a group, match cyborg from higher group with top available cyborg from the next lower group.

Three rounds (total 24 matches) should be enough here.

Link to comment
Share on other sites

  • 0

1) unreality - The Awesome

2) Frost

3) dms172

4) Mekal

5) FOTH

6) unreality - The Gladiator

7) Prime

8) <Still Open>

Prime: thanks for the tournament suggestions :D I agree in alternating first move, and I'll do that... first to win 6 games wins now, and they must win by 3 or more than the opponent to win

like I said a few pages back, I've already determine the random order (thanks to random.org :D)

***

Bracket Order:

41583762

[(4v1) v (5v8)] v [(3v7) v (6v2)] = Winner :D

#8 could end up being a random simple program

~~~

DMS: I'm not exactly sure which you want to use. I know I helped you make most of your program, but I have no idea which version you actually want to use of those, sorry :huh:

Link to comment
Share on other sites

  • 0
Wait, what? I have to go up against you first? And how is it fair that you get two programs? :P

Swiss format is so much more fair.

What happens when there is a draw? Two cyborgs finished 1:1 after two matches with one another. Or better, yet. My program allows for a draw within a single match, when two programs hook up and chase each other endlessly.

Link to comment
Share on other sites

  • 0
I already addressed this - the programs keep fighting until one has one 6 games, AND 3 more than the opponent :D

Frost: I have two because somebody a few pages back suggested I should add another of my own in case we didn't get enough people. I'll be happy to withdraw if we can find another person :P

Yeah, I know. I doubt we will get another person though. :P

Link to comment
Share on other sites

  • 0

While wating for the tournament to start, I have entered 3 programs: Fish1.1-Tuna, Fish2-Flying Fish, and Fish3-Flipper. All completely different fishes.

There are still couple of unclear points about the language for me:

1). I assume that VNA resolves all 3 command arguments before starting to execute the command.

For example, the following program does not blow itself up on the second turn:

BOMB -1;0;0

BLANK 1;0;0

SHIFT -2;-1;a(-1)

BLANK

Meaning the a(-1) argument in the SHIFT command would be resolved before the copy takes place. If the SHIFT command first copied the -2 node into the -1, then got to resolving its 3rd argument a(-1), the program would blow itself up on the next turn.

2). I assume, the address functions a(x), b(x), and c(x) derive the position relative to the line on which they appear -- not the line from which they were referenced. For example,

N1: BLANK 0;2;0

N2: BLANK b(0);1;0

N3: BLANK a(-1);0;0

The a(-1) argument in the node3 would evaluate to "1" -- not "2". In other words, b(0) refers to the second argument on the same line, regardless that it was referenced from the next line.

Link to comment
Share on other sites

  • 0

1) a/b/c parameters are evaluated when my emulator first reads the command name, turning them into numbers based on the current situation. When referenced again, they may be a different value if things their functions are based on have changed. So in your example program, a(-1) would be evaluated as positive 1 before the copying took place

2) Yes, each parameter-function (a(x),b(x),c(x)) references the line it appears on

Link to comment
Share on other sites

  • 0

About the tournament format.

1).The Olympic system is not the most adequate one for determining the strongest contestant, especially among computer programs. Suppose, program A can beat all other programs except program B. And program B will lose to all programs except program A. What if those two meet in the first round?

Olympic system is only used in competitions with a large number of entrants, to save time at the expense of certainty in finding the strongest.

2). Matching two programs until one is ahead by 3 points, may not be feasible. I can write two programs that would chase each other forever without either one winning.

With a small number of combatants, round-robin tournament is so much better. For n participants the number of matches is n*(n-1)/2. (In case of 8, it is 28 matches.)

No need to battle it out until one program is ahead by 3 points. I don’t know how long each match lasts on average, but it could take forever.

Consider one match between 2 participants as following:

1). Place two programs randomly in the queue.

2). Give the first move to the first program in the queue and let them fight.

3). Swap program places (same positions in the queue) and the first move and let them fight again.

That would be a fair match, the outcome of which could be:

a). One program won, another blew up – 2 points for a winner for the total up to 4 points in a 2-game match.

b). Neither program could kill another in a reasonable time. (I presume there is no mechanism to detect such standoff, other than elapsed time.) Then each program gets 1 point.

Such match could be repeated some pre-determined number times for each two programs. It does not matter how far one program got ahead of another in their match-up, or if they ended up even. In the end, when each program matched against all others, their score is totaled and the winner thus determined. If there is a tie, a tie-breaker round may be played.

Having 7 players, as is the case. If we limit one program per player, the total number of matches in the round-robin tournament would be 21.

Link to comment
Share on other sites

  • 0

thanks for the input :D This is how it will go:

each of the seven programs (or six, I'll remove the Gladiator if you guys want) will fight each of the others, playing one match.

One match will consist of 'game pairs'. A game pair will be the same random starting position, switching places and first moves, as Prime suggested. A game pair is only won if a program wins both scenarios. Game pairs are iterated (at new random starting loc each pair) until one program has won 4 pairs, then they win the match

At the end, I will have a scorecard of the number of matches each has won or lost. For example, if we use 7, then each program will have wins & losses that total to 7. The one with the most wins wins the tournament. A tie will result in a secondary tournament with the exact same rules but only the tying programs participate. A second tie means the programs involved in the tie are equally matched

this will be the official format :D So no more PMs/suggestions about the tournament setup from anyone please, though I just want to thank Prime for improving greatly on the previous bracket setup ;D Thanks Prime!!!

There is no built-in mechanism, I just watch the game. If I see the programs chasing each other endlessly, I can recognize a scenario in which nobody will win. This game pair will be ignored. If a tie continues to happen, I'll report the phenomenon and we'll deal with it case-by-case if something happens

Link to comment
Share on other sites

  • 0
...

At the end, I will have a scorecard of the number of matches each has won or lost. For example, if we use 7, then each program will have wins & losses that total to 7.

...

Surely, you mean 6 total wins and losses, for each of the 7 programs. Program does not fight itself, does it?

There is no built-in mechanism, I just watch the game. If I see the programs chasing each other endlessly, I can recognize a scenario in which nobody will win. This game pair will be ignored. If a tie continues to happen, I'll report the phenomenon and we'll deal with it case-by-case if something happens

Something similar (detection of infinite loop) has been formally proven to be impossible, even back in the 70s, if I am not mistaken.

Link to comment
Share on other sites

  • 0

really... hmmm. I think at very least I could program my emulator to check for both programs on some sort of easily recognizable loop that's resulting in no new bombs (like COPY 0;1;0 or SPLIT 0;x;x), but it would be complicated and I might as well watch for it myself :P But that's an interesting tidbit ;D

edit: Yeah I meant 6 not 7 sorry

Edited by unreality
Link to comment
Share on other sites

  • 0
really... hmmm. I think at very least I could program my emulator to check for both programs on some sort of easily recognizable loop that's resulting in no new bombs (like COPY 0;1;0 or SPLIT 0;x;x), but it would be complicated and I might as well watch for it myself :P But that's an interesting tidbit ;D

edit: Yeah I meant 6 not 7 sorry

I was not referring to some selected infinite loops, but to an infinite loop in general. That is, you cannot have a computer program capable of detecting all possible infinite loops in other programs.

In computability theory, this is known as Halting Problem. Actually, it was Allan Turing, who proved that theorem back in 1930s.

Link to comment
Share on other sites

  • 0
really... hmmm. I think at very least I could program my emulator to check for both programs on some sort of easily recognizable loop that's resulting in no new bombs (like COPY 0;1;0 or SPLIT 0;x;x),

...

BTW, what's SPLIT? I didn't see that command defined in this topic.

Did you design and write VNA yourself? It looks like quite a bit of programming there.

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...