Author Topic: Cheddarmold(F1)(Spork22)9-22-2015  (Read 5856 times)

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Cheddarmold(F1)(Spork22)9-22-2015
« on: July 22, 2015, 10:21:31 PM »
Well, I tried to make a bot by scratch (or, well, it had more scratch genes than copied ones  :D )and evaluate it. I became much happier with the evolved version of it, so I think that'll be the official one. Anyways, I did an ant-bot with queens selected through meritocracy. It's simply based upon the amount of kills a bot has:

-If you've killed nobody, find someone who has killed something and stick to them for dear life!

-If you have killed someone, sit there and get nudged about by your little friends.

-If you find someone who has killed the same amount of bots as you, fight to the death.

-If you've killed a bot, but someone else has killed more, sacrifice yourself to the true queen!

The worker bots will cluster around the queen and occasionally look away so that they can spot any threats that are way too close.

The best part is, they don't rely on coordinates, so there's a much higher chance that multiple hives will form.

So far, the only way they search for food is by nudging the hive around or just drifting around.

Let me know what you think, guys.


Edit: Also, give it less energy,  3000 should do the trick.
« Last Edit: November 15, 2015, 10:26:46 AM by Botsareus »
Hubba Jubba Lollywash!

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #1 on: July 23, 2015, 04:35:13 AM »
Use the # icon To put the code into a post!
Code: [Select]
LIKE THIS!
Its quite an interesting behavior though, nice use of killcounting.

If you want to make it so the higher kill counters actually control the movement of the lower kill counters (the workers) then use a couple of genes from this for MB communication and some of the normal movement genes. It basically says, if the queen see's food, follow the queen, otherwise just do your own thing nearby the queen.
Code: [Select]
'Russian Babies (F1 League)
'By Spike43884
'Originally All Eyes V1.5
'This bot goes into hibernation whilest waiting
'Should reproduce in the face of danger...or food
'Dev Info:
'Hibernation Sys - TRUE
'Hunting Sys - AllEyes
'Corpsify - UNKNOWN
'Confusion - TRUE
'Retaliation Type - Babies


'Just some free variables
def attack 50
def hibernate 51
def head 52
def maxlen 53
def minlen 54

'Initilisation (TIELENX)
start
500 .maxlen *.maxlen 500 sub sgn 1 add mult store
stop

cond
*.tielenx *.maxlen >
start
*.tinlenx 10 add *.tielenx store
stop

or

def minlen 50
def maxlen 500

cond
*.tielenx .maxlen >
start
*.tielenx 10 sub .tielenx store
stop



'Initialisation (EYES)
cond
*.robage 2 <
start
 135 .eye1width store
 135 .eye2width store
 135 .eye3width store
 135 .eye4width store
 15 .eye5width store
 135 .eye6width store
 135 .eye7width store
 135 .eye8width store
 135 .eye9width store
 410 .eye1dir store
 300 .eye2dir store
 190 .eye3dir store
 80 .eye4dir store
 0 .eye5dir store
 -80 .eye6dir store
 -190 .eye7dir store
 -300 .eye8dir store
 -410 .eye9dir store
 .aimsx .vloc store
 128 .venval store
stop



' Gene 1 Initiate Hibernation (waiting)
cond
*.eye1 0 =
 *.eye2 0 = and
 *.eye3 0 = and
 *.eye4 0 = and
 *.eye5 0 = and
 *.eye6 0 = and
 *.eye7 0 = and
 *.eye8 0 = and
 *.eye9 0 = and
 *.refeye *.myeye = or
 *.nrg 3000 < and
 *.hibernate 0 = and  'KEY
start
 1 .hibernate store
stop

' Gene 1 Search (waiting)
cond
*.eye1 0 =
 *.eye2 0 = and
 *.eye3 0 = and
 *.eye4 0 = and
 *.eye5 0 = and
 *.eye6 0 = and
 *.eye7 0 = and
 *.eye8 0 = and
 *.eye9 0 = and
 *.refeye *.myeye = or
 *.nrg 3000 >= and
start
 10 rnd .aimdx store
stop


'Gene 2 Food Sighted
'*********************
cond
*.refeye *.myeye !=
*.eyef 0 !=
start
1 .attack store
stop

cond
*.refeye *.myeye =
*.eyef 0 = or
start
0 .attack store
stop

cond
*.eye1 0 >
*.attack 0 =
start
550 .aimdx
0 .hibernate store
stop

cond
*.eye2 0 >
*.attack 0 =
start
405 .aimdx
0 .hibernate store
stop

cond
*.eye3 0 >
*.attack 0 =
start
260 .aimdx
0 .hibernate store
stop

cond
*.eye4 0 >
*.attack 0 =
start
115 .aimdx
0 .hibernate store
stop

cond
*.eye6 0 >
*.attack 0 =
start
115 .aimsx
0 .hibernate store
stop

cond
*.eye7 0 >
*.attack 0 =
start
260 .aimsx
0 .hibernate store
stop

cond
*.eye8 0 >
*.attack 0 =
start
405 .aimsx
0 .hibernate store
stop

cond
*.eye9 0 >
*.attack 0 =
start
550 .aimsx
0 .hibernate store
stop
'*********************


' Gene 3 Chase Food
cond
*.eye5 0 >
 *.refeye *.myeye !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop


' Gene 4 Long Range Food Handling

cond
 *.eye5 50 >
 *.refeye *.myeye !=
 *.refeye 0 >
 *.hibernate 0 =
start
1 rnd 2 mult 3 sub .shoot store
216 .shootval store
stop


'Gene 5 Blind Retaliation
cond
 *.hit 1 =
 *.eye5 40 > or
 *.refeye *.myeye !=
start
*.shang 90 sub .aimdx
10 .repro store
10 .repro store
stop


' Gene 6 Eat Food
cond
 *.eye5 50 >
 *.refeye *.myeye !=
 *.hibernate 0 =
 *.refeye 0 =
 *.robage 0 !=
start
-1 .shoot store
 *.refvelup .up store
stop

' Gene 7 Venom
cond
 *.hibernate 0 =
 *.venom 50 <
start
10 .strvenom store
stop

' Gene 8 Avoiding Family
cond
 *.eye5 0 =
 *.refeye *.myeye = or
 *.hibernate 0 =
start
 314 rnd .aimdx store
stop


' Gene 9 Duplicate
cond
 *.robage 0 !=
 *.numties 0 =
 *.head 0 =
start
 1 .head store
stop


' Gene 10 Reproduce
cond
 *.nrg 15000 >
 *.robage 3 > and
start
 15 .repro store
stop


' Gene 11 Reproduce for MB league
cond
 *.numties 0 =
 *.robage 0 !=
start
 10 .repro store
stop


'*-*-*-*-*-*-*-*-*-*-*-*


' Core Fat Functions
body
cond
*.nrg 1200 >
*.nrg *.body 100 add >
start
100 .strbody store
stop

cond
*.nrg 1000 <
start
100 .fdbody store
stop


' tie to parent
cond
*.robage 0 =
start
.tie inc
stop


' If MB Stuff
cond
 *.multi 1 = or
 *.hibernate 0 =
start
 50 .sharenrg store
 500 .maxlen store
 60 .stifftie store
stop

'Gene 13 MB communication
cond
 *.eye5 0 !=
 *.head 1 =
start
 *.eye5 .tout1 store
 *.aimdx .tout2 store
stop

cond
 *.tin1 0 !=
 *.head 0 =
start
*.tin2 .aimdx store
stop


'Finale Waste Disposal
cond
*.waste 100 >
*.refeye 0 =
*.reftie 0 =
start
*.waste .shootval store
-4 .shoot store
stop

end

« Last Edit: July 23, 2015, 04:45:39 AM by spike43884 »
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #2 on: July 23, 2015, 08:34:30 AM »
Thanks, i'll try it out, but, what gene in all of those genes of RB are you talking about?
« Last Edit: July 23, 2015, 08:36:27 AM by spork22 »
Hubba Jubba Lollywash!

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #3 on: July 23, 2015, 09:00:17 AM »
I believe I did this correctly. I might have to make the workers go forward when the queen sees something, though.



Code: [Select]

def head 52


cond
*.eye5 0 =
start
314 rnd .aimdx store
stop


' Gene 9 Duplicate
cond
 *.robage 0 !=
 *.numties 0 =
 *.head 0 =
*.kills *.refkills >
start
 1 .head store
stop


'Gene 13 MB communication
cond
 *.eye5 0 !=
 *.head 1 =
start
 *.eye5 .out2 store
 *.aimdx .out3 store
stop

cond
 *.in2 0 !=
 *.head 0 =
start
*.in3 .aimdx store
stop




'/*****proper reproduction 1

cond
  *.nrg
  20000
  >
start
  50
  .repro
  store
  'if time to reproduce store it
  1
  972
  store
stop

cond
  '/after robot reproduces it reproduces more until energy less then 3000
  *972
  1
  =
start
  50
  .repro
  store
stop

'***** 2

cond
  *.nrg
  3000
  <
start
  0
  972
  store
stop


cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
stop


cond
*.refkills *.kills >
*.refeye *.myeye =
start
*.refxpos *.refypos angle .setaim store
1 .up store
stop


cond
*.refkills *.kills >
*.refeye *.myeye =
*.hit 0 >
start
1 .fixpos store
stop


cond
*.robage 5 mod 0 =
*.kills 0 >
start
1 .fixpos store
stop


cond
*.robage 5 mod 0 =
*.kills 0 =
start
0 .fixpos store
stop


cond
*.kills *.refkills >
*.refeye *.myeye =
start
1 .fixpos store
stop


cond
*.reffixed 0 >
*.refeye *.myeye =
start
1 .out1 store
stop


cond
*.kills *.refkills >
*.refeye *.myeye =
*.in1 1 =
start
0 .fixpos store
stop


def nrgratio 100

cond
*.kills 0 >
start

10 dup *.nrgratio sub sgn abs .nrgratio mult store

100 .strbody *.nrg *.body 10 div *.nrgratio ++ mult       sub sgn 0 floor mult store
100 .fdbody        *.body 10 div *.nrgratio    mult *.nrg sub sgn 0 floor mult *.body 100 sub sgn 0 floor mult store

stop

cond
*.robage 25 mod 0 =
*.kills 0 =
start
628 .aimdx store
stop


cond
*.refkills *.kills >
*.kills 0 >
start
-2 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
0 .fixpos store
stop


cond
*.refkills *.kills =
*.kills 0 >
start
-1 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
0 .fixpos store
stop

end




Hubba Jubba Lollywash!

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #4 on: July 23, 2015, 12:06:47 PM »
I believe I did this correctly. I might have to make the workers go forward when the queen sees something, though.



Code: [Select]

def head 52


cond
*.eye5 0 =
start
314 rnd .aimdx store
stop


' Gene 9 Duplicate
cond
 *.robage 0 !=
 *.numties 0 =
 *.head 0 =
*.kills *.refkills >
start
 1 .head store
stop


'Gene 13 MB communication
cond
 *.eye5 0 !=
 *.head 1 =
start
 *.eye5 .out2 store
 *.aimdx .out3 store
stop

cond
 *.in2 0 !=
 *.head 0 =
start
*.in3 .aimdx store
stop




'/*****proper reproduction 1

cond
  *.nrg
  20000
  >
start
  50
  .repro
  store
  'if time to reproduce store it
  1
  972
  store
stop

cond
  '/after robot reproduces it reproduces more until energy less then 3000
  *972
  1
  =
start
  50
  .repro
  store
stop

'***** 2

cond
  *.nrg
  3000
  <
start
  0
  972
  store
stop


cond
*.eye5 50 >
*.refeye *.myeye !=
start
-1 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
stop


cond
*.refkills *.kills >
*.refeye *.myeye =
start
*.refxpos *.refypos angle .setaim store
1 .up store
stop


cond
*.refkills *.kills >
*.refeye *.myeye =
*.hit 0 >
start
1 .fixpos store
stop


cond
*.robage 5 mod 0 =
*.kills 0 >
start
1 .fixpos store
stop


cond
*.robage 5 mod 0 =
*.kills 0 =
start
0 .fixpos store
stop


cond
*.kills *.refkills >
*.refeye *.myeye =
start
1 .fixpos store
stop


cond
*.reffixed 0 >
*.refeye *.myeye =
start
1 .out1 store
stop


cond
*.kills *.refkills >
*.refeye *.myeye =
*.in1 1 =
start
0 .fixpos store
stop


def nrgratio 100

cond
*.kills 0 >
start

10 dup *.nrgratio sub sgn abs .nrgratio mult store

100 .strbody *.nrg *.body 10 div *.nrgratio ++ mult       sub sgn 0 floor mult store
100 .fdbody        *.body 10 div *.nrgratio    mult *.nrg sub sgn 0 floor mult *.body 100 sub sgn 0 floor mult store

stop

cond
*.robage 25 mod 0 =
*.kills 0 =
start
628 .aimdx store
stop


cond
*.refkills *.kills >
*.kills 0 >
start
-2 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
0 .fixpos store
stop


cond
*.refkills *.kills =
*.kills 0 >
start
-1 .shoot store
1 .up store
*.refxpos *.refypos angle .setaim store
0 .fixpos store
stop

end




You foudn the right gene, it was MB communication yes. remember to let them move if queeny see's nothign.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #5 on: July 24, 2015, 09:53:21 AM »
Ok. I'm just wondering why nobody  has found a way to set off a chain reaction in the bots that gives all of them target  coordinates, as in:

Code: [Select]
cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 *.out1 store
*.in2 *.out2 store
stop

Heh, that gives me another question. Where in a code do you put asterisks? Do they even matter much in how the program reads it?
Hubba Jubba Lollywash!

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #6 on: July 25, 2015, 05:36:44 AM »
Ok. I'm just wondering why nobody  has found a way to set off a chain reaction in the bots that gives all of them target  coordinates, as in:

Code: [Select]
cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 *.out1 store
*.in2 *.out2 store
stop

Heh, that gives me another question. Where in a code do you put asterisks? Do they even matter much in how the program reads it?

They actually do matter....that code I don't think would work...I'll explain what it does
Lets say we have this bit of code at the start of the bot:
Code: [Select]
def variableA 1Lets say variable 1 = 10
If I did
*.variableA 10 =
it would return true
but if I did
.variableA 10 =
it would return false.
VariableA's memory location (think of it like a house number) is 1. I can look to see if it is 1, by doing .variableA -- This is useful for memory shots, as you can do .up .shootval store
as if I want to see what is INSIDE variableA then I have to put a * -- This is useful for conditions, like eye distance, because when I look for the distance a bot is away from my eye, I don't actually want to know the address of my eye.
So in your peice of code it actually needs to be
Code: [Select]
cond
*.in1 0 !=
*.in2 0 !=
stat
*.in1 .out1 store
*.in2 .out2 store
stop
whenever you do store you don't put a * except in....special circumstances. If I did
*.eye5 *.VariableA store it'd actually store eye5's value in memory location 10, instead of variableA. Now in conspec fooling or such, you may put a * before whatever your storing it to, possibly in a 'special' virus as well...
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline spork22

  • Bot Destroyer
  • ***
  • Posts: 328
    • View Profile
Re: Cheddarmold (F1?) (Spork22)
« Reply #7 on: July 25, 2015, 08:46:21 PM »
OHHH. Ok :P
Hubba Jubba Lollywash!