Author Topic: Evolved Neural Network  (Read 6196 times)

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evolved Neural Network
« Reply #15 on: November 26, 2008, 04:03:14 AM »
Well, I'd love to see a usable version of DB in C++!
I (and many other people) use *nix, so programs in VB are near-impossible and in C# need to be checked for compatibility.

There's a C++-ified version of 2.4 here.

Good luck!

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Evolved Neural Network
« Reply #16 on: December 08, 2008, 11:15:46 AM »
Moonfisher-
-1 shots bypass shell entirely and only hit the poison.
Lancre operated on the feudal system, which was to say, everyone feuded all
the time and handed on the fight to their descendants.
        -- (Terry Pratchett, Carpe Jugulum)

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Evolved Neural Network
« Reply #17 on: December 23, 2008, 06:16:21 PM »
I've been working on that NN mod for a while now whenever I have some spare time.
Haven't had much time to work on it, but I've gotten to a point where it would be descent enough for anyone else to try out.
It's nowhere near done... but it works.
Haven't run this one for a long time yet, so I guess it could have some bugs... also I used DB 2.43.1h... and it has some bugs... think ties mess up and stuff like that.
But the source for 2.43.1h was the closes I could find to 2.43.1l
And didn't want to have to connect to the repository and figure out how to revert to 2.43.1l

Anyway the button for activating the NN mutations is a itle silly... and I managed to break the disable vision button somehow
Never messed with VB before was trying to copy the checkbox and... well I have no idea what happened, but it's broken.
If you activate NNmutations and start a sim then you won't be able to see it active in the menu if you open it again.
If you need to turn off the NNMutations I think you'll need to check and then uncheck the box to actualy deactivate it... (The whole GUI part was a bit confusing to me and didn't bother spending much time on it)

Annyway, buggy button aside, it should work more or less as intended.
Theres no GUI for messing with mutation rates, so they're random for starters (Just start with 100 or more bots to get lots of different settings).
You can adjust global mutation rates though.

When you enable NNmutations they will overide regular mutations. Don't disable mutations unless you intend to disbale the NNMutations.
Mutations only happen during reproduction... so you need a bot that reproduces. (I've included the test bot I'm running atm)
Appart from that, it basicaly takes your base bot and adds some Neural Network like structures to it...

You can save the simulation and reload it.... but if you copy the code from a bot the mod can't just load the network information. (You also can't just save an organism, but I might work on that later on)
You can still run it with the mod but it'll start to form a new network instead of mutating the existing one.

Also theres some coustom inputs and outputs from loc 100 to 120, look at the test bot for details.
You can also have entire genes triggered by the 10 outputs if you like... or use the output value durectly in a sysvar or whatever you prefer.

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']def NNInput1 100
def NNInput2 101
def NNInput3 102
def NNInput4 103
def NNInput5 104
def NNInput6 105
def NNInput7 106
def NNInput8 107
def NNInput9 108
def NNInput10 109

def NNOutput1 110
def NNOutput2 111
def NNOutput3 112
def NNOutput4 113
def NNOutput5 114
def NNOutput6 115
def NNOutput7 116
def NNOutput8 117
def NNOutput9 118
def NNOutput10 119

cond
*.robage 0 =
start
.shoot .ploc store
.shoot .vloc store
-2 .venval store
stop

cond
*.dnalen 400 <
*.robage 1000 <
start
.up inc
stop

cond
*.dnalen 500 <
*.robage 1500 <
*.eye5 0 >
*.refage 500 >
*.refeye 0 =
*.refshoot 0 =
start
-6 .shoot store
stop

cond
*.eye5 0 =
*.body 3000 >
*.dnalen 600 <
*.robage 2000 <
start
75 .repro store
stop

cond
*.dnalen 600 <
*.robage 3000 >
start
-2 .shoot store
32000 .shootval store
stop

'Apply inputs
start
*.refxpos *.refypos angle .NNInput1 store
*.body 1000 sub .NNInput2 store
*.refeye *.myeye sub abs .NNInput3 store
*.refshoot *.myshoot sub abs .NNInput4 store
*.refdx *.mydx sub abs .NNInput5 store
*.nrg 1000 sub .NNInput6 store
*.shell 500 sub .NNInput7 store
*.poison 500 sub .NNInput8 store
*.venom 500 sub .NNInput9 store
*.shang - *.aim add .NNInput10 store
stop


'Apply outputs
start

*.NNOutput1 0 >
50 .repro store

*.NNOutput2 0 >
-1 .shoot store

*.NNOutput3 0 >
-6 .shoot store

*.NNOutput4 0 >
-3 .shoot store

*.NNOutput5 0 >
10 .strvenom store

*.NNOutput6 0 >
10 .strpoison store

*.NNOutput7 0 >
10 .mkshell store

*.NNOutput8 0 >
1 .tie store

*.NNOutput9 0 >
-1000 .tieval store

*.NNOutput10 0 >
-6 .tieloc store

clearbool
true
stop


Other than that just run the mod as a regular drop and check the Neural network checkbox on the main screen (It will enable the mod for all species, so if you wan't to prevent veggies from mutating then you need to prevent them from reproducing.)
Litle late and a bit tired so won't go into details about how the structures are formed and all that...
Also this is a pre alpha release or something... not realy done, and some features aren't implemented and mutation rates and such need tweeking or a menu of some sort. So still a long way to go, but the base is there, and it works...
It may not be like real mutations, but it definately evolves.... no idea how fast and how well yet...
And the testbot isn't ideal for testing the concept... it more usefull for testing than long evo sims.
But it shows the basic concept...


Anyway, I'm probably not making much sense, just try the mod if you're interested and ask if you have any questions.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Evolved Neural Network
« Reply #18 on: December 26, 2008, 06:02:52 AM »
A quick update, this version is a lot better, fixed some things too.
Also it now has 20 coustom input and output slots, and a better test bot to go with it.
You can't load old version sims with this new one though.
Ran a sim with the old version for a day or 2, and it did ok, except there was a bug so it only used the coustom values. So it progressed fast but had less potential in the long run.

Still not done with this thing, and there may still be bugs, but it should definately work a lot better now.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Evolved Neural Network
« Reply #19 on: December 29, 2008, 01:03:13 PM »
Ok heres v0.4
Still not done, menues are kind of messed up, they work but don't show the real figures in use (Will work on fixing that next, just never got around to it)
Again it's not version resiliant, and the global mutation rates aren't saved with the sim, so in the next version you probably won't be able to load old sims either...

But it work well enough now, and you can actualy play around with the mutation rates to force the bot to focus on your coustom inputs during the early stages then open up for more interesting mutations later on, and stuff like that.
Or you can disable global mutation rates and alow the bots to adjust their own mutation rates... just remember that this will tend to counter increases/decreases in the global mutation multiplier. If you turn mutations up they'll just turn theirs down. So I recomend keeping it locked till you've done all the adjusting you want to do. (You can still turn the global mutation rates back on (Again the checkbox is messed up and works like the one describel earlier), and the individual mutation rates should stay faily static while they're not in use)
To access the menu just click the mutation rate button on the main screen while you have the NNMod turned on.

And theres a new test bot ofcourse

Only been running this version 16 hours, about 100K cycles. With a strong focus on using the coustom inputs and outputs.
The bots seem to catch on pretty fast though, currently they're at 550-650 in dnalen, so 2 of the genes for the base have been disabled.
It's still strugling with the 600 mark, even though some have passed it there's still a lot of shorter bots around, so it's too early to tell if they're past this point.
And I suspect the 700 mark will be the toughest one to pass since cancerous reproduction is bound to happen often when trying to take over. (I did manage to get past this step with an earlier sim, but it takes some time)

Anyway once the bot is past 700 .dnalen then the only original gene left in use will be the robage = 0 gene for setting poison and such. Then I plan on turning down the coustom inputs and outputs to leave room for more interesting development. I just want the network to controll everything before opening up to interesting mutations.
The bots are also using shell, about 500 (All the sims I've run end up around that figure if using shell it seems), and they back up whenever they see an alge now (Since the base just kept moving forward at all times).

Not that anything realy interesting has surfaced yet, but the network is definately taking shape rather fast. (Ofcourse this is probably mainly because it's so focused on using the oucstom inputs and outputs, once eveything is opened up it'll have more potential but it'll probably progress a lot slower).

This is what it looks like so far. But it'll get more interesting once it gets past 700 in dnalength and is allowed to unfold. and ofcourse once it's actualy been running long enough for something interesting to happen.
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 cond
 *.robage 0 =
 start
 7 .ploc store
 7 .vloc store
 -2 .venval store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  15  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  2 Begins at position  16  '''''''''''''''''''''''
 cond
 *.dnalen 400 <
 start
 *.robage 1500 <
 40 .up store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  27  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  3 Begins at position  28  '''''''''''''''''''''''
 cond
 *.dnalen 500 <
 start
 *.robage 2000 <
 *.eye5 0 >
 and
 *.refage 500 >
 and
 *.refeye 0 =
 and
 *.refshoot 0 =
 and
 -6 .shoot store
 stop
''''''''''''''''''''''''  Gene:  3 Ends at position  55  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  4 Begins at position  56  '''''''''''''''''''''''
 cond
 *.dnalen 600 <
 start
 *.robage 0 =
 628 .aimleft store
 *.eye5 0 =
 *.body 1000 >
 and
 *.robage 2000 <
 and
 314 .aimleft store
 stop
''''''''''''''''''''''''  Gene:  4 Ends at position  81  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  5 Begins at position  82  '''''''''''''''''''''''
 cond
 *.dnalen 700 <
 start
 *.eye5 0 =
 *.body 1000 >
 and
 *.robage 2500 <
 and
 50 .repro store
 *.robage 4500 >
 -2 .shoot store
 32000 .shootval store
 stop
''''''''''''''''''''''''  Gene:  5 Ends at position  110  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  6 Begins at position  111  '''''''''''''''''''''''
 start
 true
 *.refxpos *.refypos angle 70 store
 *.body 1000 sub 71 store
 *.refeye *.myeye sub abs 72 store
 *.refshoot *.myshoot sub abs 73 store
 *.refdx *.mydx sub abs 74 store
 *.nrg 3000 sub 75 store
 *.shell 500 sub 76 store
 *.poison 500 sub 77 store
 *.venom 500 sub 78 store
 *.shang - *.aim add 79 store
 *.eyef 80 store
 *.aim 81 store
 *.refshell 82 store
 *.refvelup 83 store
 *.refvelsx 84 store
 *.refveldx 85 store
 *.refvelup 86 store
 *.eye9 87 store
 *.eye1 88 store
 *.pain 89 store
 stop
''''''''''''''''''''''''  Gene:  6 Ends at position  197  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  7 Begins at position  198  '''''''''''''''''''''''
 start
 *100 0 >
 50 .repro store
 *101 0 >
 -1 .shoot store
 *102 0 >
 -6 .shoot store
 *103 0 >
 -3 .shoot store
 *104 0 !=
 *104 .mkshell store
 *105 0 !=
 *105 .mkpoison store
 *106 0 !=
 *106 .strvenom store
 *107 0 !=
 *107 .strbody store
 *108 0 !=
 *108 .fdbody store
 *109 0 !=
 *109 .up store
 *110 0 !=
 *110 .dn store
 *111 0 !=
 *111 .dx store
 *112 0 !=
 *112 .sx store
 *113 0 !=
 *113 .setaim store
 *114 0 !=
 *114 .aimleft store
 *115 0 !=
 *115 .aimright store
 *116 0 !=
 *116 .aimshoot store
 *117 0 !=
 *117 .shootval store
 *118 0 !=
 *118 .focuseye store
 *119 0 !=
 *119 .eye5width store
 true
 stop
''''''''''''''''''''''''  Gene:  7 Ends at position  320  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  8 Begins at position  321  '''''''''''''''''''''''
 start
 0 110 store
 0 674 store
 0 102 store
 0 946 store
 0 107 store
 0 101 store
 0 101 store
 0 101 store
 0 101 store
 0 101 store
 0 108 store
 0 103 store
 0 662 store
 0 118 store
 0 103 store
 stop
''''''''''''''''''''''''  Gene:  8 Ends at position  367  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  9 Begins at position  368  '''''''''''''''''''''''
 start
 *110 *.refvelsx -40 mult add *102 -121 mult add *108 25 mult add 145 div 110 store
 *674 *74 19 mult add *77 -10 mult add 100 div 674 store
 *103 *102 -133 mult add *110 -53 mult add *946 -29 mult add 134 div 103 store
 *110 *80 106 mult add *674 -41 mult add *73 -25 mult add *88 4 mult add 35 div 110 store
 *102 *674 -21 mult add *78 6 mult add *110 -67 mult add 53 div 102 store
 *102 *110 -66 mult add 134 div 102 store
 *107 *75 44 mult add 127 div 107 store
 *946 *84 -19 mult add *101 -78 mult add *674 -28 mult add 100 div 946 store
 *107 *86 27 mult add 100 div 107 store
 *108 *78 -20 mult add 100 div 108 store
 *101 *74 -6 mult add *674 -20 mult add 52 div 101 store
 *101 *82 62 mult add 100 div 101 store
 *104 *946 42 mult add 103 div 104 store
 *101 *83 -18 mult add 100 div 101 store
 *101 *78 28 mult add 100 div 101 store
 *101 *101 -84 mult add 100 div 101 store
 *108 *107 -20 mult add 100 div 108 store
 *103 *74 -29 mult add *674 -20 mult add 52 div 103 store
 *662 *674 -59 mult add *87 0 mult add *662 87 mult add 100 div 662 store
 *118 *662 0 mult add 100 div 118 store
 *110 *80 106 mult add *674 -41 mult add *73 -25 mult add *88 4 mult add 35 div 110 store
 *103 *75 -25 mult add 100 div 103 store
 stop
''''''''''''''''''''''''  Gene:  9 Ends at position  643  '''''''''''''''''''''''

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evolved Neural Network
« Reply #20 on: November 21, 2009, 11:55:44 AM »
Hey moonfisher! I've been wondering what has become of your NNmod of DB. Have you tried it? Have you evolved anything interesting?

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Evolved Neural Network
« Reply #21 on: November 22, 2009, 11:31:02 AM »
Well ran a sim over a week or so, then next time I had to load it I realized I made an error either when saving or loading the newest NN data...
The last bot I can find that I saved looked like this :

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 cond
 *.robage 0 =
 start
 7 .ploc store
 7 .vloc store
 -2 .venval store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  15  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  2 Begins at position  16  '''''''''''''''''''''''
 cond
 *.dnalen 400 <
 start
 *.robage 1500 <
 40 .up store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  27  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  3 Begins at position  28  '''''''''''''''''''''''
 cond
 *.dnalen 500 <
 start
 *.robage 2000 <
 *.eye5 0 >
 and
 *.refage 500 >
 and
 *.refeye 0 =
 and
 *.refshoot 0 =
 and
 -6 .shoot store
 stop
''''''''''''''''''''''''  Gene:  3 Ends at position  55  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  4 Begins at position  56  '''''''''''''''''''''''
 cond
 *.dnalen 600 <
 start
 *.robage 0 =
 628 .aimleft store
 *.eye5 0 =
 *.body 1000 >
 and
 *.robage 2000 <
 and
 314 .aimleft store
 stop
''''''''''''''''''''''''  Gene:  4 Ends at position  81  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  5 Begins at position  82  '''''''''''''''''''''''
 cond
 *.dnalen 700 <
 start
 *.eye5 0 =
 *.body 1000 >
 and
 *.robage 2500 <
 and
 50 .repro store
 *.robage 4500 >
 -2 .shoot store
 32000 .shootval store
 stop
''''''''''''''''''''''''  Gene:  5 Ends at position  110  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  6 Begins at position  111  '''''''''''''''''''''''
 start
 true
 *.refxpos *.refypos angle 70 store
 *.body 1000 sub 71 store
 *.refeye *.myeye sub abs 72 store
 *.refshoot *.myshoot sub abs 73 store
 *.refdx *.mydx sub abs 74 store
 *.nrg 3000 sub 75 store
 *.shell 500 sub 76 store
 *.poison 500 sub 77 store
 *.venom 500 sub 78 store
 *.shang - *.aim add 79 store
 *.eyef 80 store
 *.aim 81 store
 *.refshell 82 store
 *.refvelup 83 store
 *.refvelsx 84 store
 *.refveldx 85 store
 *.refvelup 86 store
 *.eye9 87 store
 *.eye1 88 store
 *.pain 89 store
 stop
''''''''''''''''''''''''  Gene:  6 Ends at position  197  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  7 Begins at position  198  '''''''''''''''''''''''
 start
 *100 0 >
 50 .repro store
 *101 0 >
 -1 .shoot store
 *102 0 >
 -6 .shoot store
 *103 0 >
 -3 .shoot store
 *104 0 !=
 *104 .mkshell store
 *105 0 !=
 *105 .mkpoison store
 *106 0 !=
 *106 .strvenom store
 *107 0 !=
 *107 .strbody store
 *108 0 !=
 *108 .fdbody store
 *109 0 !=
 *109 .up store
 *110 0 !=
 *110 .dn store
 *111 0 !=
 *111 .dx store
 *112 0 !=
 *112 .sx store
 *113 0 !=
 *113 .setaim store
 *114 0 !=
 *114 .aimleft store
 *115 0 !=
 *115 .aimright store
 *116 0 !=
 *116 .aimshoot store
 *117 0 !=
 *117 .shootval store
 *118 0 !=
 *118 .focuseye store
 *119 0 !=
 *119 .eye5width store
 true
 stop
''''''''''''''''''''''''  Gene:  7 Ends at position  320  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  8 Begins at position  321  '''''''''''''''''''''''
 start
 0 674 store
 0 109 store
 0 909 store
 0 107 store
 0 .eye2dir store
 0 .readtie store
 0 .eye3dir store
 0 104 store
 0 110 store
 0 874 store
 0 106 store
 0 .sharewaste store
 0 175 store
 0 .sharewaste store
 0 100 store
 0 112 store
 0 109 store
 0 .stifftie store
 0 .backshot store
 0 109 store
 0 110 store
 0 .eye6width store
 0 106 store
 0 109 store
 0 .genes store
 0 108 store
 0 106 store
 0 .mkvirus store
 0 116 store
 0 105 store
 0 883 store
 0 .readtie store
 0 .eye3dir store
 0 108 store
 0 113 store
 0 182 store
 0 105 store
 0 .in8 store
 0 .eye2dir store
 0 .eye1dir store
 0 116 store
 0 .readtie store
 0 107 store
 0 .strvenom store
 0 .sharewaste store
 stop
''''''''''''''''''''''''  Gene:  8 Ends at position  457  '''''''''''''''''''''''

''''''''''''''''''''''''  Gene:  9 Begins at position  458  '''''''''''''''''''''''
 start
 *674 *73 24 mult add *78 -31 mult add *109 -70 mult add 119 div 674 store
 *102 *82 -35 mult add *674 -66 mult add *100 18 mult add *.paralyzed 24 mult add 134 div 102 store
 *110 *80 137 mult add *674 -63 mult add *82 31 mult add *.shup 4 mult add *73 11 mult add 35 div 110 store
 *109 *.trefvelyourdn -68 mult add *.sharewaste -37 mult add 100 div 109 store
 *102 *102 -28 mult add 168 div 102 store
 *909 *.hitdx -9 mult add *75 42 mult add 100 div 909 store
 *107 *102 -35 mult add 148 div 107 store
 *101 *.eye3dir -57 mult add *115 -3 mult add 100 div 101 store
 *.eye2dir *85 -123 mult add *.myties 95 mult add 148 div .eye2dir store
 *.sharewaste *85 57 mult add *.slime 31 mult add 281 div .sharewaste store
 *.eye3width *.genes 59 mult add *82 141 mult add *.in3 -37 mult add 100 div .eye3width store
 *.eye3dir *109 25 mult add 113 div .eye3dir store
 *101 *81 73 mult add 73 div 101 store
 *.readtie *109 29 mult add *70 28 mult add *105 -7 mult add 131 div .readtie store
 *.eye3dir *108 -155 mult add *.eyef 27 mult add *.eye9 120 mult add 101 div .eye3dir store
 *104 *84 11 mult add *76 -43 mult add 126 div 104 store
 *110 *.readtie 1 mult add 94 div 110 store
 *874 *.shsx -47 mult add *.shup -20 mult add *74 -22 mult add 100 div 874 store
 *101 *106 8 mult add *71 45 mult add 91 div 101 store
 *100 *78 -10 mult add *.trefvelyourup 50 mult add *674 -62 mult add *101 185 mult add *79 73 mult add *76 -29 mult add 131 div 100 store
 *106 *102 42 mult add *.tieang 9 mult add *.in3 87 mult add 95 div 106 store
 *.sharewaste *.multi 102 mult add 87 div .sharewaste store
 *175 *.eye3dir 20 mult add *100 8 mult add 100 div 175 store
 *.sharewaste *101 31 mult add *.trefxpos -31 mult add *.trefbody -5 mult add 100 div .sharewaste store
 *100 *102 -67 mult add *83 -4 mult add 100 div 100 store
 *112 *.velsx 51 mult add 119 div 112 store
 *101 *.trefvelmydx -34 mult add *114 52 mult add 100 div 101 store
 *109 *110 -51 mult add *71 -38 mult add *.eye5 -68 mult add 100 div 109 store
 *.stifftie *84 -22 mult add 94 div .stifftie store
 *109 *.refvelscalar 33 mult add 100 div 109 store
 *.backshot *.trefvelyourdx 73 mult add 75 div .backshot store
 *109 *.fertilized -57 mult add *.eye3dir 52 mult add 156 div 109 store
 *110 *115 18 mult add *106 -156 mult add *.hitup -83 mult add 89 div 110 store
 *.eye6width *74 27 mult add *.refvelup -54 mult add 100 div .eye6width store
 *106 *.vel 63 mult add *87 -31 mult add *.in5 138 mult add 100 div 106 store
 *111 *85 160 mult add 100 div 111 store
 *109 *.out6 -100 mult add 144 div 109 store
 *109 *82 102 mult add 52 div 109 store
 *.genes *.out2 -65 mult add *.shdx 32 mult add 20 div .genes store
 *.fixlen *89 -25 mult add 100 div .fixlen store
 *108 *.tout2 -20 mult add 84 div 108 store
 *106 *109 -115 mult add *110 91 mult add 100 div 106 store
 *.in5 *.mysx -39 mult add *81 -16 mult add 101 div .in5 store
 *.mkvirus *.refveldx 52 mult add *112 -2 mult add *.shsx 1 mult add 100 div .mkvirus store
 *116 *109 -128 mult add 100 div 116 store
 *105 *.shup 41 mult add *.rdboy 78 mult add 101 div 105 store
 *883 *.refmulti -78 mult add *101 59 mult add 142 div 883 store
 *.readtie *.trefvelmysx 87 mult add *79 28 mult add 100 div .readtie store
 *.eye3dir *.poisoned 51 mult add 100 div .eye3dir store
 *106 *72 5 mult add 139 div 106 store
 *108 *107 -36 mult add *.eye1 7 mult add 84 div 108 store
 *113 *70 100 mult add 100 div 113 store
 *182 *.out9 0 mult add *.dnalen -23 mult add 100 div 182 store
 *105 *.eye1 -4 mult add 100 div 105 store
 *.in8 *.eye2dir 63 mult add 100 div .in8 store
 *.eye2dir *116 -145 mult add *85 -113 mult add 100 div .eye2dir store
 *.eye1dir *84 -56 mult add *.eye5 75 mult add 100 div .eye1dir store
 *116 *182 -23 mult add 100 div 116 store
 *.readtie *.trefvelmysx 87 mult add *71 28 mult add 100 div .readtie store
 *105 *874 18 mult add *.stifftie -33 mult add 101 div 105 store
 *101 *.eye3dir -57 mult add *115 -3 mult add 100 div 101 store
 *883 *.eye2dir -22 mult add *175 8 mult add 117 div 883 store
 *.in3 *892 -2 mult add 100 div .in3 store
 *.sharewaste *85 57 mult add *.slime 38 mult add 281 div .sharewaste store
 *107 *909 42 mult add *.refveldx 96 mult add 127 div 107 store
 *.strvenom *78 75 mult add 100 div .strvenom store
 *.sharewaste *101 31 mult add *.trefxpos -31 mult add *.trefbody -5 mult add 100 div .sharewaste store
 *.eye4width *.refaim -44 mult add 100 div .eye4width store
 *.in8 *84 23 mult add 100 div .in8 store
 stop
''''''''''''''''''''''''  Gene:  9 Ends at position  1336  '''''''''''''''''''''''



I generaly seemed that with a NN the bot was able to quickly finetune settings... but was less likely to evolve something new. So it was mainly good at adapting.
I don't think the way DB code works and a NN are all that different when it comes down to it. Most evolved code I've seen crossreferences data all over the place, much like I'd imagine a biological NN would do.
DB code can just take bigger steps, but is also less likely to achieve something usefull with a mutation.
But since I couldn't load that sim I was running up again I kinda put the whole thing on hold for a while.
I know one of the versions was able to save and load properly, but it was lacking other features. Also the long code generated for the NN makes the sim run slower
Overall the mod is not properly done and may be interesting, but not any better for running evo sims I think.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7719
    • View Profile
Evolved Neural Network
« Reply #22 on: November 22, 2009, 02:59:29 PM »
Quote from: Moonfisher
I don't think the way DB code works and a NN are all that different when it comes down to it.

Came to the same conclusion when I was redoing DNA for DB3.  I was toying around with the idea of a neural net with programmable weights, but realized it was becoming regular old DNA anyway.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
Evolved Neural Network
« Reply #23 on: April 26, 2010, 11:55:10 AM »
Quote from: Numsgil
Quote from: Moonfisher
I don't think the way DB code works and a NN are all that different when it comes down to it.

Came to the same conclusion when I was redoing DNA for DB3.  I was toying around with the idea of a neural net with programmable weights, but realized it was becoming regular old DNA anyway.

... We try to make neural nets inside a single bot, thats the problem i think.
Another aprouch is to Design (outside of DB ?) a multibot in which each bot equals a single neuron.
Still it is complex (because of all connected ties (and getting them connect to the right other neuron).
But if you can do that .... maybe its possible.

I think this rather requires some kind of external multibot editor.
who can put it in a safe game format.
And in which each bot we can put specific DNA.. well let call it protains functions )

As to safe such multibot (like .repro) we would need a new repro command to put such advanced bleuprint trough..

.... thinking futher.. maybe all these DNA codemay exist then in each cell (just as our DNA) but only have the right ones active..
Still then we ned another way of repro (to build at once the same complex child with a repro)

..
hmmm.. then if you got it... how to train it ?  (is food enough to train it?)


Offline ashton15

  • Bot Builder
  • **
  • Posts: 99
    • View Profile
Evolved Neural Network
« Reply #24 on: April 26, 2010, 04:24:59 PM »
Quote
... We try to make neural nets inside a single bot, thats the problem i think.
Another aprouch is to Design (outside of DB ?) a multibot in which each bot equals a single neuron.
Still it is complex (because of all connected ties (and getting them connect to the right other neuron).
But if you can do that .... maybe its possible.
Would be more realistic but problem is for that kind of thing surely you would need loads of bots as in 100s and we know how much that can cripple performance, perhaps each but could contain a small neural net within a single cell and link to another bot which was like a small compartment of the brain.

Quote
I think this rather requires some kind of external multibot editor.
who can put it in a safe game format.
And in which each bot we can put specific DNA.. well let call it protains functions )
Me likey...  A lot, would help because take a person for example and take it apart and then expect the individual cells to re-assemble, just doesn't work when you start from scratch

Quote
As to safe such multibot (like .repro) we would need a new repro command to put such advanced bleuprint trough..
hmm... I'd agree that probably agree that the hardest thing about multibots is assembly... though a function like that just seems to plastic to me

Quote
.... thinking futher.. maybe all these DNA codemay exist then in each cell (just as our DNA) but only have the right ones active..
Still then we ned another way of repro (to build at once the same complex child with a repro)
Isn't this bieng worked on for DB3?

Quote
..
hmmm.. then if you got it... how to train it ?  (is food enough to train it?)

What about possesion? Also why train it? Surely partially it would be instinctive behaviours and then others it would learn from it's enviroment and parent natrually.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7719
    • View Profile
Evolved Neural Network
« Reply #25 on: April 26, 2010, 04:54:10 PM »
Quote from: ashton15
Quote
.... thinking futher.. maybe all these DNA codemay exist then in each cell (just as our DNA) but only have the right ones active..
Still then we ned another way of repro (to build at once the same complex child with a repro)
Isn't this bieng worked on for DB3?

I'm thinking that after repro it ends up copying all the memory as well (or allowing a bot to specifically do this/not do this).  So if you have a neural net with dynamic weights and you repro all those weights get preserved.  But I'm not 100% about it either way.

Offline peterb

  • Bot Destroyer
  • ***
  • Posts: 148
    • View Profile
Evolved Neural Network
« Reply #26 on: April 26, 2010, 06:07:35 PM »
Quote from: Numsgil
Quote from: ashton15
Quote
.... thinking futher.. maybe all these DNA codemay exist then in each cell (just as our DNA) but only have the right ones active..
Still then we ned another way of repro (to build at once the same complex child with a repro)
Isn't this bieng worked on for DB3?

I'm thinking that after repro it ends up copying all the memory as well (or allowing a bot to specifically do this/not do this).  So if you have a neural net with dynamic weights and you repro all those weights get preserved.  But I'm not 100% about it either way.


Well having read somethings about it    

There are some interesting things about NN, for example if a single neuron dies... its not a problem (if the NN isnt to small), they as a group adapt.
On the other hand (DB shape = function) to suround such cells with some common cell with a lot of .shell (otherways creatures attacking brains get nasty killers.. ohwell its ok too..).
In reality if you drink some alcholic you wont die because some neurons got killed, after some drink you behave funny, but later you repair, your 'mind' isnt erased.
There are some neural nets (also in todays post at another topic here : http://ccsl.mae.cornell.edu/emergent_self_models  
That realy learn from no awernes to walking (i've seen a documentary about that bot, its kinda rocket science)

It means if the net is real good it might tweak and tune itself (starting from some randomization values)
I think for us here starters in this field / copying values within some margins of the parents value would be more likely.


You know also interesting is that most √≥fficial books (not all)  talk about 3 or more layered NN
But it is not realy required.... the brain isnt a layered structure in 3 or more layers.. its more complex.
I dont want to create such a complexity as the brain,  however it means if the right logic in a single neuron bot, then it isnt limited to a layer structure
In essence shape as MB shapes might become more functional, ..or even evolve by well some darwin rules, we allready now from DB.

Also the right code doesnt mean the sim would get slow, its only some tie communication we allready can do, but have not done in this perspective i think.
It woulod only mean a bit more tie communication.. oh well computers are known to be able to do NN beter then me using a calculator...


But this 'new' multibots need a way of beeing created, an external editor (and once created some kind of  DNA string or bleurprint ( ??? ideas on that ??, save ties positions ?? )) for .repro

(because it so different i have been thinking of cell differentiation earlier.. a rebro bot, not much command processing only smart at repro, while others are only good at other specific functions)

also interesting just notice the general things a NN can do from this article http://www.sciencedaily.com/releases/2010/...00425151146.htm (pretty hot stuff)


I'm not thinking DB would be the best NN simulator, but i think having it all combined a NN a genetic part, and shape (of a MB) to be a factor of function.. is pretty close to exciting biology emulation..



i think you get the idea


( oh and check this out, someone is doing something verry similair to DB in java with neural net "cells" http://tim.hibal.org/blog/  (asbout halfway his blog..




Getting some NN inside DB is my reason to code again, but maybe my previous aprouch to learn opengl (intresting...) etc, wanst the right direction..
« Last Edit: April 27, 2010, 06:59:11 AM by peterb »