Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Reiyuki

Pages: [1]
1
The Gene depository / OCULUS II
« on: April 30, 2008, 12:36:19 PM »
Quote from: bacillus
This must be my most elaborate and unreadable code I ever produced. I checked over it twice (a very tedious job!!!) and found no errors, so should work. OCULUS I turned towards the thing it needed to turn least towards to face it; OCULUS II faces towards the closest thing in sight, using the priority system of OCULUS I in case of conflicts.

-4 *.eye1 *.eye9 sub sgn 0 floor mult *.eye1 *.eye8 sub sgn 0 floor mult *.eye1 *.eye7 sub sgn 0    floor mult *.eye1 *.eye6 sub sgn 0 floor mult *.eye1 *.eye5 sub sgn 0 floor mult *.eye1 *.eye4 sub   sgn 0 floor mult *.eye1 *.eye3 sub sgn 0 floor mult *.eye1 *.eye2 sub sgn 0 floor mult 4 *.eye9     *.eye8 sub sgn 0 floor mult *.eye9 *.eye7 sub sgn 0 floor mult *.eye9 *.eye6 sub sgn 0 floor mult
 *.eye9 *.eye5 sub sgn 0 floor mult *.eye9 *.eye4 sub sgn 0 floor mult *.eye9 *.eye3 sub sgn 0 floor  mult *.eye9 *.eye2 sub sgn 0 floor mult *.eye9 *.eye1 sub sgn ++ sgn mult add -3 *.eye2 *.eye9 sub   sgn ++ sgn mult *.eye2 *.eye8 sub sgn 0 floor mult *.eye2 *.eye7 sub sgn 0 floor mult *.eye2 *.eye6  sub sgn 0 floor mult *.eye2 *.eye5 sub sgn 0 floor mult *.eye2 *.eye4 sub sgn 0 floor mult *.eye2    *.eye3 sub sgn 0 floor mult *.eye2 *.eye1 sub sgn ++ sgn mult add 3 *.eye8 *.eye9 sub sgn ++ sgn     mult *.eye8 *.eye7 sub sgn 0 floor mult *.eye8 *.eye6 sub sgn 0 floor mult *.eye8 *.eye5 sub sgn 0   floor mult *.eye8 *.eye4 sub sgn 0 floor mult *.eye8 *.eye3 sub sgn 0 floor mult *.eye8 *.eye2 sub   sgn ++ sgn mult *.eye8 *.eye1 sub sgn ++ sgn mult add -2 *.eye3 *.eye9 sub sgn ++ sgn mult *.eye3    *.eye8 sub sgn ++ sgn mult *.eye3 *.eye7 sub sgn 0 floor mult *.eye3 *.eye6 sub sgn 0 floor mult
 *.eye3 *.eye5 sub sgn 0 floor mult *.eye3 *.eye4 sub sgn 0 floor mult *.eye3 *.eye2 sub sgn ++ sgn   mult *.eye3 *.eye1 sub sgn ++ sgn mult add 2 *.eye7 *.eye9 sub sgn ++ sgn mult *.eye7 *.eye8 sub     sgn ++ sgn mult *.eye7 *.eye7 sub sgn 0 floor mult *.eye7 *.eye6 sub sgn 0 floor mult *.eye7 *.eye5  sub sgn 0 floor mult *.eye7 *.eye4 sub sgn ++ sgn mult *.eye7 *.eye2 sub sgn ++ sgn mult *.eye7     *.eye1 sub sgn ++ sgn mult add -1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn     mult *.eye4 *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn 0 floor mult *.eye4 *.eye5 sub sgn 0    floor mult *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub     sgn ++ sgn mult add 1 *.eye4 *.eye9 sub sgn ++ sgn mult *.eye4 *.eye8 sub sgn ++ sgn mult *.eye4    *.eye7 sub sgn ++ sgn mult *.eye4 *.eye6 sub sgn ++ sgn mult *.eye4 *.eye5 sub sgn 0 floor mult
 *.eye4 *.eye3 sub sgn ++ sgn mult *.eye4 *.eye2 sub sgn ++ sgn mult *.eye4 *.eye1 sub sgn ++ sgn     mult add 0 *.eye5 *.eye9 sub sgn ++ sgn mult *.eye5 *.eye8 sub sgn ++ sgn mult *.eye5 *.eye7 sub     sgn ++ sgn mult *.eye5 *.eye6 sub sgn ++ sgn mult *.eye5 *.eye4 sub sgn ++ sgn mult *.eye5 *.eye3   sub sgn ++ sgn mult *.eye5 *.eye2 sub sgn ++ sgn mult *.eye5 *.eye1 sub sgn ++ sgn mult add .focuseye store


That is a sweet bit of code there.
I mean look at it, the thing's longer than most bots themselves, and only needs one store command to function.  


How do you think it would handle mutations?

2
Interesting behaviour bots / Battlestar bot 4-28-08
« on: April 29, 2008, 07:34:50 PM »
Quote from: EricL
Quote from: Reiyuki
I like to use as few genes as possible, but it does make it harder to write multimode bots.

Not at all.  Seasnake is a single gene....

Alos, if people posted zipped example sims of their bots, it would eliminate the issues with duplicating enviornmental or starting conditions...

Fair enough
(attached sim with best example of behavior)

3
The Gene depository / Timerless timer
« on: April 29, 2008, 04:15:39 PM »
I didn't know .timer wrapped, so that would definitely work.    
*.timer 10 mod 1 =
(runs once every 10 cycles)


Figured I'd add some hacks to this concept too..  

Lets say you want to only run a certain gene 10 cycles out of 100:
*.timer 100 mod 90 >=

will activate when timermod= 90,91,92,93,94,95,96,97,98,99  but no other time.
Would result in a 10% duty cycle with a 100 cycle frequency.


It might be useful for synchronized breeding, virii propagation, flock management, etc.  I know I use it all the time.

4
Interesting behaviour bots / Battlestar bot 4-28-08
« on: April 29, 2008, 02:18:03 PM »
Quote from: Moonfisher
It seems to get confused a lot... tryed no fluid, thing fluid and transitory...
Seems thin fluids are best, but it seems like the base should save it's position and move back if it's pushed too far away...
If you want it to beat spinner you should probably start with v1.1 or 1.0, since the newest version uses ties rather agressively... so you would need some good tie defences and counter moves if you want it to beat the new ones.
I'm not sure if you want it to be an F2 bot, seems that way... but I think it would perform a lot better if it used tie feeding.
The trick is that your small bots are so small they can't drain the alge effectively... but you can make the alge feed you instead :

'Conspec, just so it's all there
def mykey 50

cond
*.robage 0 =
start
123 .mykey store
.mykey .tmemloc store
stop

'Eating alge
cond
*.tmemval *.mykey !=
*.numties 0 >
start
'The usual stuff :
*.trefxpos *.trefypos angle .setaim store
20 .up store
*.tiepres .tienum store
99 .sharenrg store

'The actual trick.
'Push a positive value into the alge's tieval
.tieval .tieloc store
1000 .tieval store
'Shoot -1 or -6 into the alge's tieloc
.tieloc .shoot store
-1 .shootval store
*.trefnrg 1000 <
-6 .shootval store
stop

'Feeding the base
cond
*.tmemval *.mykey =
*.trefbody 1000 >
*.numties 0 >
start
*.tiepres .tienum store
-1 .tieloc store
1000 .tieval store
stop

Or something like that anyway...
It still needs to avoid confusion among the drones though...
And the conspec can be tricked :

cond
*.robage 0 =
start
.tmemloc .tmemloc store
stop

cond
*.tmemloc .tmemloc !=
start
*.tmemval *.tmemloc store
.tmemloc .tmemloc store
stop

cond
*.numties 0 >
*.tmemloc .tmemloc =
*.tmemval 0 >
*.tmemval .tmemloc !=
start
*.tmemval .tmemloc store
stop


And ofcourse you can prevent this by saving you key in several places and checking a random one, so if a bot hasstolen a conspec it will still be visible to most bots... or you can add robage to your key every X cycles, and check to see if *.trefage *.key add is withing the right range (x)... this way a stolen key will expire after x cycles... or you can combine the 2...
The same works for .memloc/.memval ofcourse...


Thanks for the tie thing, I always had issues getting the veggies to feed right.  
As for tie defense...  The base should have enough nrg to keep up a 300 unit slime, which would pretty much prevent it from being decapitated.  The drones are more expendable.


As for the bot itself, I designed it in thin fluid and haven't really tested on anything else yet.  That would explain some of the odd behavior.  The rest of it is probably due to bugs in the vision/tracking.  A revamp on that whole part would probably clear some things up.

I like to use as few genes as possible, but it does make it harder to write multimode bots.

5
Interesting behaviour bots / Battlestar bot 4-28-08
« on: April 28, 2008, 11:14:48 PM »
I never thought I'd waste this much time and have so much fun doing so.  I rebuilt the battlestar bot from scratch and made it into a fairly reliable setup.  (launch them at 5000nrg or above, preferably 30k)

Nifty features:
 - Battlestar (mothership) randomly spews tiny drone ships to scour the land for resources
 - When drones gather 2500 nrg, they will return to base and dump their cargo
 - If drones see each other, they will trade parent locations and return to the stronger parent when full
 - Eyetracking algorithm results in minor flocking patterns


Future ideas:
 - Virus delivery (cause robots to zombie toward the mothership)
 - Inter-mothership communication/coordination  (motherships congregate and share power)
 - Tie-proofing and/or tie feeding
 - Proper poison/venom swarming


Something tells me I'll be at this all week until I can get it to withstand spinners
have fun



 cond
 *.out1 3 =
 *.pleas 1 <
 *.nrg 2500 >
 start
 4 .out1 store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  15  '''''''''''''''''''''''
 cond
 *.out1 4 =
 *.eye5 60 >
 *.in3 *.out3 =
 *.in4 *.out4 =
 start
 *.nrg 2 div .shootval store
 -2 .shoot store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  38  '''''''''''''''''''''''
 cond
 *.out1 4 =
 *.in2 *.out2 !=
 *.in1 1 !=
 start
 *.out3 *.out4 angle .setaim store
 5 .up store
 stop
''''''''''''''''''''''''  Gene:  3 Ends at position  58  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.out1 2 =
 or
 *.robage 2 >
 *.vel 40 <
 *.eye5 10 <
 start
 15 .up store
 10 rnd 5 sub .aimright store
 stop
''''''''''''''''''''''''  Gene:  4 Ends at position  86  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.out1 4 =
 or
 *.out1 2 =
 or
 *.eye5 20 <
 *.eye1 0 >
 *.eye9 0 >
 or
 *.eye3 20 >
 or
 *.eye7 20 >
 or
 start
 *.eye1 1 ceil *.eye9 1 ceil sub 140 mult .aimleft store
 *.eye8 *.eye2 sub *.eye7 add *.eye3 4 div sub .aimright store
 stop
''''''''''''''''''''''''  Gene:  5 Ends at position  140  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.out1 4 =
 or
 *.out1 2 =
 or
 *.eye5 10 >
 *.eye5 200 <
 *.refeye *.myeye !=
 start
 *.refveldx .dx store
 *.refvelup 90 add .up store
 *.refxpos *.refypos angle .setaim store
 stop
''''''''''''''''''''''''  Gene:  6 Ends at position  176  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.eye5 0 >
 *.in2 *.out2 =
 start
 *.refveldx .dx store
 *.refvelup 20 add .up store
 *.refaim .setaim store
 stop
''''''''''''''''''''''''  Gene:  7 Ends at position  199  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.out1 2 =
 or
 *.eye5 80 >
 *.refeye *.myeye !=
 *.in2 100 <
 *.in3 100 <
 start
 *.pain 2 div 1 floor 4 add 25 ceil 3 *.out1 mod 1 ceil mult 1 add .shootval store
 -1 .shoot store
 *.refxpos *.refypos angle .setaim store
 *.refvelup 1 add .up store
 stop
''''''''''''''''''''''''  Gene:  8 Ends at position  253  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.in2 *.out2 >
 *.myeye *.refeye =
 start
 *.in2 .out2 store
 *.in3 .out3 store
 *.in4 .out4 store
 stop
''''''''''''''''''''''''  Gene:  9 Ends at position  274  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.out1 2 =
 or
 *.in1 4 =
 start
 *.refaim 618 add .setaim store
 stop
''''''''''''''''''''''''  Gene:  10 Ends at position  292  '''''''''''''''''''''''
 cond
 *.robage 3 =
 start
 -2 .venval store
 7 .vloc store
 30 .strvenom store
 stop
''''''''''''''''''''''''  Gene:  11 Ends at position  307  '''''''''''''''''''''''
 cond
 *.in3 100 <
 *.eye5 60 >
 *.robage 4 mod 0 =
 *.refeye *.myeye !=
 *.refshoot 0 !=
 start
 19 .vloc store
 *.refxpos *.refypos angle 628 add .venval store
 5 .shootval store
 -3 .shoot store
 5 .strvenom store
 stop
''''''''''''''''''''''''  Gene:  12 Ends at position  346  '''''''''''''''''''''''
 cond
 *.in3 100 <
 *.eye5 60 >
 *.robage 4 mod 1 =
 *.refeye *.myeye !=
 *.refshoot 0 !=
 start
 8 .vloc store
 800 .venval store
 5 .shootval store
 -3 .shoot store
 5 .strvenom store
 stop
''''''''''''''''''''''''  Gene:  13 Ends at position  381  '''''''''''''''''''''''
 cond
 *.in3 100 <
 *.eye5 60 >
 *.robage 4 mod 2 =
 *.refeye *.myeye !=
 *.refshoot 0 !=
 start
 7 .vloc store
 -2 .venval store
 5 .shootval store
 -3 .shoot store
 5 .strvenom store
 stop
''''''''''''''''''''''''  Gene:  14 Ends at position  416  '''''''''''''''''''''''
 cond
 *.out1 3 =
 *.robage 1 >
 start
 *.genes .delgene store
 stop
''''''''''''''''''''''''  Gene:  15 Ends at position  428  '''''''''''''''''''''''
 cond
 *.robage 1 =
 *.nrg 5000 <
 start
 3 .out1 store
 330 *.robage 1 add mult inc
 .deltie inc
 618 .aimright store
 *.in2 .out2 store
 *.in3 .out3 store
 *.in4 .out4 store
 *.body 10 mult 100 sub .fdbody store
 stop
''''''''''''''''''''''''  Gene:  16 Ends at position  467  '''''''''''''''''''''''
 cond
 *.robage 1 =
 *.nrg 3000 >=
 start
 2 .out1 store
 330 *.robage 1 add mult inc
 .deltie inc
 618 .aimright store
 stop
''''''''''''''''''''''''  Gene:  17 Ends at position  490  '''''''''''''''''''''''
 cond
 *.out1 2 =
 *.robage 100 >
 *.nrg 10000 >
 start
 *.vel -1 mult .up store
 1 .out1 store
 *.nrg .out2 store
 *.xpos .out3 store
 *.ypos .out4 store
 7 .ploc store
 stop
''''''''''''''''''''''''  Gene:  18 Ends at position  522  '''''''''''''''''''''''
 cond
 *.out1 0 =
 *.out1 2 =
 or
 *.nrg 10000 >
 *.refeye *.myeye !=
 *.vel 0 =
 start
 1 .out1 store
 *.nrg .out2 store
 *.xpos .out3 store
 *.ypos .out4 store
 7 .ploc store
 stop
''''''''''''''''''''''''  Gene:  19 Ends at position  556  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.eye5 20 <
 *.eye1 0 >
 *.eye9 0 >
 or
 *.eye3 20 >
 or
 *.eye7 20 >
 or
 start
 *.eye1 1 ceil *.eye9 1 ceil sub 140 mult .aimleft store
 *.eye8 *.eye2 sub *.eye7 add *.eye3 4 div sub .aimright store
 stop
''''''''''''''''''''''''  Gene:  20 Ends at position  602  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.eye5 30 >
 *.refeye *.myeye !=
 *.in2 100 <
 *.in3 100 <
 *.refbody 4 >
 start
 *.pain 2 div 1 floor 4 add 25 ceil .shootval store
 -1 .shoot store
 *.refxpos *.refypos angle .setaim store
 stop
''''''''''''''''''''''''  Gene:  21 Ends at position  642  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.robage 5 mod *.pain add 4 >=
 *.eye5 30 <
 *.in1 0 !=
 or
 start
 120 .aimright store
 stop
''''''''''''''''''''''''  Gene:  22 Ends at position  665  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.nrg 16000 >
 *.body 30000 <
 start
 100 .strbody store
 stop
''''''''''''''''''''''''  Gene:  23 Ends at position  680  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.nrg 10000 <
 start
 100 .fdbody store
 stop
''''''''''''''''''''''''  Gene:  24 Ends at position  692  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.nrg 11000 >
 *.slime 500 <
 start
 50 .mkslime store
 stop
''''''''''''''''''''''''  Gene:  25 Ends at position  707  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.nrg 16000 >
 *.shell 10000 <
 start
 100 .mkshell store
 100 .mkpoison store
 stop
''''''''''''''''''''''''  Gene:  26 Ends at position  725  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.waste 1000 >
 start
 1000 .shootval store
 -4 .shoot store
 stop
''''''''''''''''''''''''  Gene:  27 Ends at position  740  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.out3 *.out4 dist 50 >
 start
 *.out3 *.out4 angle .setaim store
 1 .up store
 0 .dx store
 stop
''''''''''''''''''''''''  Gene:  28 Ends at position  762  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.robage 50 mod 1 =
 *.eye5 50 <
 start
 2 .repro store
 stop
''''''''''''''''''''''''  Gene:  29 Ends at position  779  '''''''''''''''''''''''
 cond
 *.out1 1 =
 *.out1 2 =
 or
 *.mkvirus 0 !=
 start
 *.mkvirus .delgene store
 stop
''''''''''''''''''''''''  Gene:  30 Ends at position  795  '''''''''''''''''''''''

6
The Gene depository / Timerless timer
« on: April 27, 2008, 03:16:46 PM »
Quote from: gymsum
Quote from: Reiyuki
cond
*.robage 20 mod 1 =
start
stop

Activates gene every 20 cycles


(change to *.robage 50 for 50 cycles, etc)


Took some tinkering to figure out, but was beautiful once I got it.

I think you should make a bot that uses timed behaviors and timed triggers. You'll need a master gene switcher to prevent retardation or wrong behaviors. I think this would be perfect for say a mating ritual, or even a complex movement by a multi-bot.

Actually, I find it most useful in creating very efficient bots for harsh environments.  My test bot was a grasshopper that 'hopped' every 20 cycles but was otherwise dormant unless food was in sight.
[you]Extremely[/you] efficient, almost hibernating.

7
The Gene depository / Timerless timer
« on: April 27, 2008, 01:07:20 PM »
cond
*.robage 20 mod 1 =
start
stop

Activates gene every 20 cycles


(change to *.robage 50 for 50 cycles, etc)


Took some tinkering to figure out, but was beautiful once I got it.

8
Untagged bots / Battlestar bot 04-27-08
« on: April 27, 2008, 12:26:29 PM »
Long time listener first time botter...

Battlestar galactica.  Experimental version


It's only about half finished but here's the gist of how it works:

The mothership is where everything starts.  From birth, it sits in place.  Thanks to this, it can gather as much body and defenses it needs and not worry about moving.  In fact, the more massive, the better.

Every 30 cycles, it fires off a .1 repro 'drone' that flies off in a somewhat straight line

The drone has little energy (<800) and only 8 body, so it deletes its own excess genes to limit nrg draw.  If it finds food, it eats a couple thousand nrg.   Then it uses stored memory to return to the mothership and 'deliver' the nrg, sacrificing the drone in the process.  If a drone sees another drone that was born from a stronger mothership (more nrg), it will shift its return port to the stronger or the 2.  Supply of the fittest.


'''
''Run at 32000 nrg in thin fluid or metal
''

Pages: [1]