Code center > Old Suggestions Awaiting Programming
Simulation Tools
shvarz:
--- Quote ---Would you prefer the output to go to the console or into a text file?
--- End quote ---
I was thinking everything real-time on screen :)
Shen:
Yes, but its pain to check it out as the window is small and a complicated bot would have 20+ pages of code to check. Im also thinking of it as a newbie tool since most newbie bots posted have a couple of typos or a missing *. or something. A simple 'Check DNA' button that highlights any unrecognised labels, checks for cond/start/stop/end and so on would be ultra useful for your average newb. Even most of us have accidently put a 'start' instead of 'cond' at some point.
PurpleYouko:
Console then?
We would just need an additional control added to the console to output your desired information following gene activation.
Depending on the level of detail required.
Something like this if gene 3
--- Code: ---cond
*.eye1 *.eye5 >
start
25 .aimsx store
stop
--- End code ---
1 -
2 -
3 - executed
*.eye1 = 52
*.eye5 = 10
condition = true
.aimsx = 25
stack 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
4 -
5 -
etc.
The stack remains empty for this kind of gene and it seems pointless to display the stack as each the eye is added, then delete them again when the gene is finished, so displaying it once at the end of an activated gene would work best.
Let's say we used a turning gene such as DOM INV uses. Gene 3 =
--- Code: ---cond
*.eye1 *.eye5 >
start
mult
25
stop
--- End code ---
It would look like this
1 -
2 -
3 - executed
*.eye1 = 52
*.eye5 = 10
condition = true
stack 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25
4 -
5 -
The mult command just clears the stack so it doesn't show up here.
Would that do it or do you want to see each and every step mirrored in the stack?
shvarz:
I thought stack is never cleared unless some function removes values from it? Why do you say:
--- Quote ---it seems pointless to display the stack as each the eye is added, then delete them again when the gene is finished
--- End quote ---
OK, here is what I was thinking. It should very-very basic, for people like me, who don't program much or for newbies. Some optional shortcuts may be available for advanced users to skip some of the stuff described below.
We have four windows:
- one shows DNA,
- one shows all memory locations (with special ones, like sysvars, highlighted slightly),
- one shows stack and condition stack.
- one shows stuff like energy, which bot depends on, but has no direct control over
You can modify any of these values manually if you want to. Like type in 5000 into energy.
You load the DNA in, press "GO" and program starts from the top. Say your gene 3 is actually one and only gene 1 in DNA. It goes like this:
cond
*.eye1
'program asks you for *.eye1 value, you input 52 (alternative - you actually place a second bot on a special tiny window so that values are measured automatically and realistically)
'you see 52 appearing on the stack
*.eye5
'program asks you for *.eye5 value, you input 10
'you see 10 appearaing at the top of the stack and 52 moving down
>
'you see 52 and 10 blinking a couple of times, then they disappear from stack and "true" appears on condition stack
'We see message: "Gene is activated!"
start
25
'25 appears on stack
.aimsx
'6 appears on top of stack and 25 is moved down on stack
store
'6 and 25 blink a couple of times and disappear from stack, memory location 6 blinks a couple of times and you see 25 appearing there
stop
end
Program shows summary window:
energy spent: blah-blah
actions taken: bot is turned N degrees to the left
Three buttons on summary window: "Start over", "Go to next cycle", "Done"
"Start over" resets all values and goes through DNA again (in case you missed something)
"Go to next cycle" processes all values and continues execution of DNA.
"Done" allows you to change things in all four windows, like change DNA, change mem location, values and so on. This way if you spot the problem in DNA, you can fix it right here in the window.
The reason I want it to be so basic is two-fold: 1. Coding for newbies will become much easier. 2. Analysis of complex (and especially evolved bots) will be much easier.
The problem with evolved bots is that they do a lot of crap that sometimes actually gets something done. And it is a hell to try and trace every single thing that they do, becasue they often do it in a non-straightforaward way. Tool like that would allow to easily spot things like stack overflows, weird actions and so on.
PurpleYouko:
AHH! Now I understand what you mean.
I like this idea :D
One question I have is,
Would you like this to be exclusively a DNA debugging tool into which you directly enter a robot DNA file then follow it through stepwise or would you want it to be accessible during a simulation?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version