Author Topic: Building a catch-eye bot  (Read 4331 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Building a catch-eye bot
« on: June 11, 2007, 01:09:44 PM »
I think it would be good if we built a bot with the only purpose of showing interesting behaviours. Then put it in the default download with a nice background pic so it catches the eye for DB newcomers.

So, I open this thread to considerate genes that could produce those interesting behaviour. Later we can pick some of these and mashup them in some bots.

Self evolving bot ID gene
This gene makes the bots using out1 for ID fight occasionally.

cond
*.robage 1 =
start
*971 2 rnd 1 sub add 971 store
*971 *.out1 store
stop

Tailing
Bots that tail each other instead of avoid conspecs are always fun to watch. So no conspec check there.
I'm working on a better "follow the mass" gene.

cond
*.eye5 0 >
*.eye5 90 <
start
*.refxpos *.refypos angle .setaim store
stop
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Building a catch-eye bot
« Reply #1 on: June 11, 2007, 02:49:51 PM »
I put it in a pack bot.

Start with 50 of these and let them go one thousand cycles on a decent sized toroidal sim.

Code: [Select]
'Name: Fishy 1.0
'Author: MacadamiaNuts 11 June 2007
'Description: Turn your simulation into a fishtank!
'Watch them tailing each other and forming big masses of different size fish.

'FOLLOW THE MASS
cond
pain 0 =<
start
-10 *.eye9 sgn mult
-10 *.eye8 sgn mult add
-10 *.eye7 sgn mult add
-10 *.eye6 sgn mult add

10 *.eye4 sgn mult add
10 *.eye3 sgn mult add
10 *.eye2 sgn mult add
10 *.eye1 sgn mult add

*.aim add 1256 mod .setaim store

50 *.velup sub .up store
0 .fixpos store
stop

'MATCH SPEED
cond
*.eye5 0 >
start
50 *.velup sub .up store
*.refveldx .dx store
0 .fixpos store
stop


'MATCH DIRECTION
cond
*.eye5 0 >
*.refeye *.myeye =
start
*.refaim *.aim sub 2 div *.aim add .setaim store
stop

'FEED
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-6 .shoot store
stop

'STOP FOR FEEDING
cond
*.eye5 65 >
*.refeye *.myeye !=
start
1 .fixpos store
stop


'DO LOTS OF LITTLE FISHIES
cond
*.nrg 30000 >
start
1256 rnd .setaim store
5 .repro store
stop

'MAINTENANCE AND EDGE CHECK
cond
start
*.nrg 10 div *.body sub .strbody store
*.body 10 mult *.nrg sub .fdbody store
*.waste .shootval *.waste 100 div abs mult store
-4 .shoot *.waste 100 div abs mult store
628 .aimdx *.edge mult store
stop

What would you add to it?
« Last Edit: June 11, 2007, 03:46:54 PM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Building a catch-eye bot
« Reply #2 on: June 11, 2007, 05:15:57 PM »
Breaking ties by overextending, use of fixpos for stopping, parallel search pattern (all bots move in same direction when searching although that rather makes following a bit redundant). How about rotating the eyes rather than rotating the bot.

Maybe think of some other things later.
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Building a catch-eye bot
« Reply #3 on: June 12, 2007, 05:25:47 AM »
I think an ant bot that ran well on on the current version would be neat.

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Building a catch-eye bot
« Reply #4 on: June 15, 2007, 08:43:37 PM »
Oh! there was a gene I accidentally made once that created really pretty patterns. lemme see if I can find it or recreate it.
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 Jez

  • Bot Overlord
  • ****
  • Posts: 788
    • View Profile
Building a catch-eye bot
« Reply #5 on: June 16, 2007, 08:06:40 AM »
Something like Patterns from turning?
If you try and take a cat apart to see how it works, the first thing you have in your hands is a non-working cat.
Douglas Adams

Offline abyaly

  • Bot Destroyer
  • ***
  • Posts: 363
    • View Profile
Building a catch-eye bot
« Reply #6 on: June 16, 2007, 10:25:03 AM »
No, it's a social behavior.
By the way, rotating eyes means you have to do a lot of messy calculations with reguard to moving in the right direction. I think it isn't worth it

Code: [Select]
'Spiral
'Interesting Behavior bot by abyaly
'They work together to find food
'For version 2.43
'June 16, 2007




def spiral -15
'This number controls how much sideways push the bot
'exerts when part of a group.

def size 50
'This number controls how much body each bot will maintain

def swarmnumber 20
'This number is the maximum number of
'degrees of seperation between the bot and food
'for which it will follow the ally it sees.
'They branch off more if the number is lower.
'With a negative number they will never try to split up

def swarmdensity 90
'This numbers controls how close each bot wants to be
'to allies it follows. With higher numbers they tend to
'get closer and act more excited.


def id 8654
def status 62
def ally 1
def food 2
def enemy 3

cond
*.robage 0 =
start
  .tie inc
  140 .eye5width store
  .id .out5 store
stop

cond
start
  *.body .size sub *.body ceil .fdbody store
  .size *.body sub *.nrg 1000 sub ceil .strbody store
  *.tiepres dup sgn abs .deltie mult store
  0 .fixpos *.fixed mult store
stop

cond
  *.eye5 0 >
start
  .ally
    *.in5 .id sub sgn abs -- - mult
  .status store
  .food .status
    *.status .ally sub sgn abs mult
    *.refshoot sgn -- - mult
    *.refaimsx sgn -- - mult
    *.refshell sgn -- - mult
    *.refslime sgn -- - mult
    *.refvenom sgn -- - mult
    *.refkills sgn -- - mult
    *.refeye sgn -- - mult
    *.refup sgn -- - mult
  store
  .enemy .status
    *.status .ally sub sgn abs mult
    *.status .food sub sgn abs mult
  store
stop

cond
  *.eye5 0 =
  *.in3 0 = or
  *.robage 2 >
start
  *.aim 317 sub .setaim store
  *.robage dup 2 mod add 4 mod 2 mult
  .up *.robage 2 mult 4 mod sgn 3 mult add store
stop

cond
  *.eye5 0 >
  *.status .ally =
  *.in3 0 !=
  *.robage 1 >
start
  *.in1 .out1 store
  *.in2 .out2 store
  *.in3 -- .out3 store
  *.in1 *.in2 angle .setaim store
  *.refvelup .swarmdensity *.eye5 sub add *.velup abs - floor .up store
  *.refveldx .spiral add .dx store
stop

cond
  *.eye5 0 >
  *.status .ally !=
  *.robage 1 >
start
  *.refxpos *.refypos angle .setaim store
  *.refvelup 80 *.eye5 sub add *.velup abs - floor .up store
  *.refveldx .dx store
stop

cond
  *.eye5 0 >
  *.status .food =
  *.robage 1 >
start
  *.refxpos .out1 store
  *.refypos .out2 store
  .swarmnumber .out3 store
stop

cond
  *.eye5 70 >
  *.status .food =
start
  -1 .shoot store
stop

cond
  *.eye5 70 >
  *.status .food =
  *.robage 10 mod 0 =
  *.reffixed 0 =
start
  .fixpos .shoot store
  1 .shootval store
stop

cond
  *.eye5 70 >
  *.status .enemy =
start
  -1 .shoot store
  *.nrg 5 div 200 ceil .shootval store
stop

cond
  *.nrg 2000 >
start
  *.aim 317 add .setaim store
  50 .repro store
stop
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 fulizer

  • Bot Destroyer
  • ***
  • Posts: 198
    • View Profile
Building a catch-eye bot
« Reply #7 on: December 18, 2007, 06:22:59 AM »
Quote from: Numsgil
I think an ant bot that ran well on on the current version would be neat.
I think that py should do that because he/she made all the other ants ans it was also the main purpose of the db game im making to do that but yes an actual simulation.
how about ants that attack other ant colonis that would be cool to watch
"If this is coffee bring me tea, If this is tea, bring me coffee"