Author Topic: Blind bot  (Read 3938 times)

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Blind bot
« on: May 15, 2011, 12:28:05 PM »
I think this might have been used before... The challenge is to create a "fully functional bot" without using any of the eyes, any of the ins/outs or any of the refvars. I have no idea how possible this is to do and I haven't thought over it... but I think we should have a go...

Fully functional bot in this case(Stolen from PhiNotPi and modified) :
  • Feed off of prey.  This can be as inefficiant as needed, as long as the bot gains net energy from the attack.
  • Not attack conspecs.  It should not treat conspecs as enemies.
  • Reproduce.  This should be controlled with some sort of condition.
  • Populate the sim in F1 conditions.  It will be released into an environment of Alga_Minimalis.

I hope this will be harder than the last! :p It's fine to add or help with other bots too. I think this will work better as a community challenge!

Offline ashton1993

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Re: Blind bot
« Reply #1 on: May 15, 2011, 01:00:40 PM »
Well that's easy as done

Code: [Select]
start
*.maxvel 20 div *.vel sub - .up *.vel *.maxvel 22 div sub sgn 1 sub abs mult store 'travel at constant velocity
.tie *.hitup -- abs 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 10 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

Just going to test it now

EDIT -> made a mistake in the reproduction part though I've now fixed it and the bot is doing well for itself
« Last Edit: May 15, 2011, 01:16:45 PM by ashton1993 »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Blind bot
« Reply #2 on: May 15, 2011, 01:10:18 PM »
It doesn't have to be short by the way. :p

Offline ashton1993

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Re: Blind bot
« Reply #3 on: May 15, 2011, 01:13:18 PM »
ah shucks it works anyway XD

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Blind bot
« Reply #4 on: May 15, 2011, 01:20:31 PM »
Okay... then, if anybody else submits one, then it will go against that one. :p (Makes it a little harder. Hehe.)

Offline ashton1993

  • Bot Neophyte
  • *
  • Posts: 14
    • View Profile
Re: Blind bot
« Reply #5 on: May 15, 2011, 01:37:08 PM »
 anyway made it a bit more orderly and efficient =D
Code: [Select]
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



Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Blind bot
« Reply #6 on: May 15, 2011, 01:49:55 PM »
I forgot to say... you can also use "tin" and "tout"... because that's not using sight.

Offline PhiNotPi

  • Bot Builder
  • **
  • Posts: 64
    • View Profile
Re: Blind bot
« Reply #7 on: May 16, 2011, 08:17:12 AM »
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: [Select]
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
« Last Edit: May 16, 2011, 08:26:13 AM by PhiNotPi »
I am biased neither towards nor against any single mathematical constant.

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Blind bot
« Reply #8 on: May 30, 2012, 04:52:14 PM »
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: [Select]
' 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

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
Undisputed creator of bot Sonar!

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: Blind bot
« Reply #9 on: May 30, 2012, 06:47:58 PM »
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).

Offline PhiNotPi

  • Bot Builder
  • **
  • Posts: 64
    • View Profile
Re: Blind bot
« Reply #10 on: June 03, 2012, 08:53:27 PM »
It's about time that somebody beat my entry on this thread! I created it with the goal of being very compact yet effective. It is simple, but it stood as the victor for over a year! I've been inactive for much of that period, but I might just attempt to reclaim my title.

By the way, the "echolocation" system is a very creative idea; I don't think that anyone has ever attempted that before.
I am biased neither towards nor against any single mathematical constant.

Offline ikke

  • Bot Destroyer
  • ***
  • Posts: 300
    • View Profile
Re: Blind bot
« Reply #11 on: June 04, 2012, 01:03:48 PM »
I might be out of a job in a couple of weeks time so I just might take a shot. What version of DB is used?

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Blind bot
« Reply #12 on: June 04, 2012, 01:50:32 PM »
I used the version that Num (Thanks) fixed here: http://forum.darwinbots.com/index.php/topic,1249.0.html, File: http://forum.darwinbots.com/index.php?action=dlattach;topic=1249.0;attach=949
This is 2.45.01 with a .shflav and .shang fix.

The original post for this contest was to not use ref values, but now ref values work with vision disabled, for collisions, so Maybe we can use them now?

I have another bot I'm making that beats this bot, but it uses ref values.
Undisputed creator of bot Sonar!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Blind bot
« Reply #13 on: July 12, 2012, 05:53:29 PM »
Hey, just an fyi that blind bots can now cut there birth tie with this fix: http://forum.darwinbots.com/index.php/topic,3674.msg1384382.html#msg1384382
« Last Edit: July 12, 2012, 06:06:23 PM by Botsareus »

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Re: Blind bot
« Reply #14 on: October 21, 2012, 07:16:05 PM »
Wow, I forgot I even posted this. That is a brilliant idea, echo location. How did you even think of that?