General > Bot Challenges

Blind bot

<< < (2/4) > >>

ashton1993:
 anyway made it a bit more orderly and efficient =D

--- Code: ---start
*.maxvel 2 div *.vel sub - .up *.vel *.maxvel 3 div sub sgn 1 sub abs mult *.robage 10 sub sgn - ++ sgn mult store 'travel at constant velocity
.tie *.hitup -- abs mult *.numties -- sgn - ++ sgn mult inc 'if hit by something in front of you tie to it
.hitup *.hitup mult dec 'reset value of hitup
50 .sharenrg *.multi mult *.timer 2 mod -- abs sgn -- abs mult store 'share energy with everything it's tied too - including veggies which will give it energy every

10 cycles
50 .repro *.nrg 2000 sub sgn ++ sgn mult store 'when bot has 2000 energy reproduce
stop
--- End code ---


Panda:
I forgot to say... you can also use "tin" and "tout"... because that's not using sight.

PhiNotPi:
This bot seems to do well, as in it destroys the previous entry.  It constantly fires ties, which allows it to capture food from a distance.  The gain of capturing more food most likely outweighs the cost of extra tie firing.  If the bot fires a tie at conspec, it is repelled and deletes the tie.  This has the benifit of sending offspring away to find more food.

--- Code: ---start
5 .aimdx store
1259 .tout1 store
*.tiepres .tienum store
*.numties 0 =
.tie inc
*.tin1 1259 !=
.tieloc dec
-1000 .tieval store
not
-10 .up store
*.tiepres .deltie store
*.nrg 3000 >
10 .repro store

--- End code ---

Tilthanseco:
It's a year late, but I want to post my bot also. It beats every bot here. It uses echolocation using shots. Don't worry, I made it without knowing about the contest. (a couple days ago)
Animal Resono 1.0


--- Code: ---' Animal_Resono_1.0 (F2)(Tilthan) 30.05.12
' Also Blind Bot, Interesting Behavior

' This bot does not use any eyes and can run with vision disabled
' It uses info shots as conspec recognition, I'm in the process of changing this so it can be in F3
' It is the only bot I know of that uses echolation using shots
' I'm very proud that it can beat some bots with eyes (A_Minimalis...)
' A side effect of it's conspec is that it makes a mine field and plays pinball
' Version 1.1 is in the bestiary.

def guess 50
def search 51

def me 52
def age 10
def power 32


' 1 Get Mom Tie
cond
*.robage 0 =
start
.tie inc
stop

' 2 Get Rid of Mom Tie
cond
*.robage 1 =
start
.deltie inc
stop

' 3 Get Away from Mom
cond
*.robage .age <
*.vel 180 <
start
10 .dn store
stop

' 4 Find Food, Start Sonar
cond
300 *.nrg div 5 add rnd 0 =
and
*.guess 0 =
and
*.robage .age >
start
100 rnd 100 add .aimdx store
-1 .shoot store
.search inc
stop

' 5 Find Food, Get Sonar
cond
*.shang 0 >
and
*.robage .age >
and
*.me 0 =
start
*.shang .aimdx store
3 .guess store
*.velup -1 mult .up store
*.veldx -1 mult .dx store
0 .search store
stop

' 6 Tell Comrades to Move
cond
*.guess 1 =
start
.me .shoot store
.shootval inc
.guess dec
stop

' 7 Shoot at Food
cond
*.guess 1 >
start
-6 .shoot store
.power .shootval store
.guess dec
stop

' 8 Migrate for more Food
cond
*.search 600 >
*.nrg 500 >
start
-100 .up store
0 .search store
stop

' 9 Unstick if stuck
cond
*.fixed 0 >
start
0 .fixpos store
stop

'''''''''''Better movement hopefully
' 10 Shot Front, move forward
cond
*.shdn 0 !=
start
*.up -10 add .up store
stop

' 11 Shot Back, move back
cond
*.shup 0 !=
start
*.up 10 add .up store
stop

' 12 Shot Right, Move Right
cond
*.shdx 0 !=
start
*.dx 10 add .dx store
stop

' 13 Shot Left, Move Left
cond
*.shsx 0 !=
start
*.dx -10 add .dx store
stop

' 14 Body Maintenence
cond
*.nrg 1120 >
*.body 500 <
start
100 .strbody store
stop

' 15
cond
*.nrg 1000 <
*.body 50 >
start
100 .fdbody store
stop

' 16 If Fam warns me or If I hit Fam, Move
cond
*.me 0 !=
and
*.robage 0 !=
start
0 .guess store
284 rnd 120 add .aimdx store
-80 .up store
0 .me store
stop

' 17 Reproduce
cond
*.nrg 10000 >
and
*.pleas 0 %=
'and
'*.robage .age >
start
30 .repro store
stop

end
--- End code ---

P.S. Version 1.1 of this bot is better, but uses ref values, but now ref values work on blind bots, so it is still blind.
Also I used Nums current .shang fix (2) http://forum.darwinbots.com/index.php/topic,1249.0.html

Numsgil:
Ah, that's a pretty sweet idea.  I don't think anyone's really tried it before (but then, with the shang stuff broken for a while that's hardly surprising).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version