Author Topic: Simulation Tools  (Read 20436 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Simulation Tools
« on: April 15, 2005, 08:38:24 AM »
What simulation tools would you like to see?

I'd love to get better graphs.  The current ones, well, suck.  Darwinpond (google it) has some pretty good graphs going on.  And a way to save graph data to an excel exportable file, like the snapshot function, would be pretty cool.

Also, user definable 'best bot' parameters would rock.

And a control that charts the flow of energy in the simulation would be pretty cool too.  It would show you how much energy flows into vegs, how much energy vegs use, how much energy flows into veg feeding bots or is lost to the simulation, how much energy bots use, how much energy is flowing into carnivores, etc.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation Tools
« Reply #1 on: April 15, 2005, 11:07:40 AM »
DNA analysis tool: load the DNA in, then go command by command and see the stack and all the memory locations visually with newly-written values lighting up.  When bot checks for something like the presence of tie or the value of eye, it asks you for input.  At the end of the cycle the summary is given: "bot will shoot such and such particle, bot will move so much, its energy is going to be..." and so on.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Shen

  • Bot Destroyer
  • ***
  • Posts: 111
    • View Profile
Simulation Tools
« Reply #2 on: April 15, 2005, 11:08:01 AM »
New graphs would be nice, there not much use atm other than monitoring your sim while the video output is disabled.

Id like to see an improved console as well. Its a valuble tool for debugging bots but very user unfriendly. Maybe adjustable size, combine it with the 'Gene Activation' tool so you can view more than one cycles worth at a time without scrolling in a tiny box. And auto refreshed eye values. Current stack contents. As much as you can cram in basically.

More stats for indiviual bots as well. Nrg consumed/used, average nrg used per cycle, kills.

A DNA parser/checker would be cool as well. Nothin like hunting for a typo in 30 genes of F1 bot, useful for newbies as well.

Also theres an update for DarwinPond, GenePool4. Havnt used it much though, I always get die offs.
« Last Edit: April 15, 2005, 11:09:45 AM by Shen »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #3 on: April 15, 2005, 11:20:04 AM »
Quote
DNA analysis tool: load the DNA in, then go command by command and see the stack and all the memory locations visually with newly-written values lighting up.  When bot checks for something like the presence of tie or the value of eye, it asks you for input.  At the end of the cycle the summary is given: "bot will shoot such and such particle, bot will move so much, its energy is going to be..." and so on.
That shouldn't be toooooo difficult to program.
Would you prefer the output to go to the console or into a text file?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #4 on: April 15, 2005, 11:22:26 AM »
Nice ideas Shen

Quote
A DNA parser/checker would be cool as well. Nothin like hunting for a typo in 30 genes of F1 bot, useful for newbies as well.
You do realize that the best way to do this now is to run the bot then look at its DNA in the info window. All typos come out as zeroes. It is pretty easy to see mistakes this way.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation Tools
« Reply #5 on: April 15, 2005, 11:26:49 AM »
Quote
Would you prefer the output to go to the console or into a text file?


I was thinking everything real-time on screen :)
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Shen

  • Bot Destroyer
  • ***
  • Posts: 111
    • View Profile
Simulation Tools
« Reply #6 on: April 15, 2005, 11:31:28 AM »
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.
« Last Edit: April 15, 2005, 11:32:26 AM by Shen »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #7 on: April 15, 2005, 11:45:23 AM »
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: [Select]
cond
*.eye1 *.eye5 >
start
25 .aimsx store
stop
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: [Select]
cond
*.eye1 *.eye5 >
start
mult
25
stop

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?
« Last Edit: April 15, 2005, 01:18:52 PM by PurpleYouko »
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation Tools
« Reply #8 on: April 15, 2005, 12:26:06 PM »
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


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.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #9 on: April 15, 2005, 01:27:36 PM »
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?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Simulation Tools
« Reply #10 on: April 15, 2005, 01:29:32 PM »
what would be awesome is if we can add stuff to egrids when that system is done.
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #11 on: April 15, 2005, 01:32:09 PM »
Quote
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

What I mean to say is that for a gene that isn't activated, the net result is no change to the stack, however in light of your latest explanation I see that it is precisely these step-by-step changes that you want to see.
 B)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation Tools
« Reply #12 on: April 15, 2005, 01:33:41 PM »
Just a stand-alone would be fine.  Of course having that in actual sim gives it a lot more power.  But a stand-alone would work too.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Simulation Tools
« Reply #13 on: April 15, 2005, 01:35:55 PM »
Quote
What I mean to say is that for a gene that isn't activated, the net result is no change to the stack


Not in mutated bots.  They can have a condition like this:

cond
25
34
24
124
345
5683
4
34
start
blah
stop

This would fill up the stack regardless of whether the gene is executed or not, right?
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Simulation Tools
« Reply #14 on: April 15, 2005, 01:45:38 PM »
I think it would be just as easy to put it directly in the sim, maybe with a toggle to. 1) bring in real values from the sim for the selected robot
2) Use a blank copy of the robot's memory and selectively activate its current genes using artificial stimuli.

Hopefully we can use the existing code to a large extent but it might require some reworking in places.

Definitely a worthwhile project though  :)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D