Author Topic: Hunter v.5  (Read 1087 times)

Offline Darwin226

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Hunter v.5
« on: November 02, 2008, 03:15:50 PM »
Here's my hunter. It's in 0.5 so it's still a work in progress.

I have no idea how good or bad it is.

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Hunter v.5 by Darwin226
'Hunts and kills everything that can shoot
'Now uses healing

Code: [Select]
def mode 50
def submode 51
def timer 52
def count 53

'Defines starting values on birth
cond
*.robage 0 =
start
1 .mode store
1 .submode store
stop

'The timer. IMPORTANT
cond
1 *.count =
start
.timer inc
stop

cond
0 *.count =
start
0 .timer store
stop

'Change direction ocassionally
cond
*.robage 100 mod 0 =
*.mode 1 =
start
140 .aimdx store

'S1
cond
1 *.mode =
1 *.submode =
start
15 .dx store
.timer inc
stop

'S2
cond
1 *.mode =
2 *.submode =
start
15 .up store
.timer inc
stop

'S3
cond
1 *.mode =
3 *.submode =
start
15 .sx store
.timer inc
stop

'S2
cond
1 *.mode =
4 *.submode =
start
15 .up store
.timer inc
stop

'T1
cond
1 *.mode =
1 *.submode =
*.timer 15 >
start
2 .submode store
0 .timer store
stop

'T2
cond
1 *.mode =
2 *.submode =
*.timer 15 >
start
3 .submode store
0 .timer store
stop

'T2
cond
1 *.mode =
3 *.submode =
*.timer 15 >
start
4 .submode store
0 .timer store
stop

'T2
cond
1 *.mode =
4 *.submode =
*.timer 15 >
start
1 .submode store
0 .timer store
stop

'Move out of the way
cond
*.eye5 50 >
*.refshoot 0 = and
*.refeye *.myeye != and
start
45 .shootval store
.sx .shoot store
stop

'Search and Destroy mode detection
cond
*.eye5 0 >
*.refshoot 0 !=
*.refeye *.myeye !=
*.mode 2 !=
*.out1 4515 !=
start
0 .timer store
2 .mode store
1 .submode store
stop

cond
*.eye5 0 >
*.in1 4515 =
*.mode 2 !=
start
0 .timer store
2 .mode store
1 .submode store
stop

'SD1
cond
2 *.mode =
1 *.submode =
*.eye5 0 >
*.eye5 50 <
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

'SS1 (Kill or Heal)
cond
2 *.mode =
1 *.submode =
*.eye5 50 >
*.in1 4515 !=
start
2 .submode store
stop

cond
2 *.mode =
1 *.submode =
*.eye5 50 >
*.in1 4515 =
*.refnrg *.nrg <
start
0 .in1 store
8 .submode store
stop

cond
2 *.mode =
1 *.submode =
*.eye5 50 >
*.in1 4515 =
*.refnrg *.nrg >
start
15 .dx store
0 .in1 store
1 .submode store
stop

'Prepare venom
cond
*.robage 20 mod 0 =
*.nrg 1000 >
*.venom 300 <
start
300 *.venom sub .strvenom store
.fixpos .vloc store
1 .venval store
stop

'SD2 (Kill)
cond
2 *.mode =
2 *.submode =
*.venom 50 >=
start
4 .submode store
32000 .shootval store
stop

cond
2 *.mode =
2 *.submode =
*.robage 20 mod 0 !=
start
5 .submode store
stop


'SD4 If you are ready to feed, paralyze the target
cond
2 *.mode =
4 *.submode =
start
-3 .shoot store
5 .submode store
stop

'SD5 Finally eat the pray
cond
2 *.mode =
5 *.submode =
*.refpoison 0 =
*.venom 0 =
start
-1 .shoot store
.oldven dec
stop

cond
2 *.mode =
5 *.submode =
*.refpoison 0 !=
*.venom 0 =
start
-6 .shoot store
.oldven dec
stop

cond
2 *.mode =
5 *.submode =
*.robage 1 add 20 mod 0 =
start
2 .submode store
stop

'Exit S&D if you don't see anything you would eat
cond
2 *.mode =
*.eye5 0 =
*.refeye *.myeye = or
*.refshoot 0 = or
start
1 .mode store
1 .submode store
0 .timer store
stop

'SD8 Paralyze the injured bot so you can heal him
cond
*.mode 2 =
*.submode 8 =
start
-3 .shoot store
0 .timer store
1 .count store
9 .submode store
stop

'SD9 Give him some of your energy
cond
*.mode 2 =
*.submode 9 =
*.timer 2 =
start
*.refnrg *.nrg add 3 div *.refnrg sub .shootval store
-2 .shoot store
10 .submode store
stop

'SD10
cond
*.mode 2 =
*.submode 10 =
*.timer 3 =
start
0 .count store
*.refveldx -2 mult .dx store
1 .mode store
1 .submode store
stop

'A small adjustment in turning
cond
*.mode 2 =
start
*.refveldx 3 div .aimdx store
stop

'If you have enough energy, make some poison
cond
*.nrg 1000 >
*.poison 50 <
start
50 *.poison sub .strpoison store
.shoot .ploc store
stop

'If you have enough energy, make some slime
cond
*.nrg 2000 >
*.slime 300 <
start
300 *.slime sub .mkslime store
stop

'If you get tied, free yourself
cond
*.mode 3 !=
*.numties 0 !=
start
*.tienum .deltie store
stop

'If you are full, make a fammily, tell them to wait till the tie is broken
cond
*.nrg 5000 >
*.mode 2 !=
*.mode 0 !=
start
3 .mode store
1 .submode store
0 .timer store
stop

'R1
cond
*.mode 3 =
*.submode 1 =
start
560 .aimdx store
50 .repro store
2 .submode store
0 .timer store
stop

'R2
cond
*.mode 3 =
*.submode 2 =
start
560 .aimdx store
1 .mode store
1 .submode store
stop

cond
*.body 300 <
*.nrg 300 *.body sub 10 mult 500 add >
start
300 *.body sub 10 mult .strbody store
stop

'WARNING Random crazyness
cond
*.hit 0 !=
*.hitsx 0 !=
*.hitdx 0 !=
*.hitdn 0 !=
*.hitup 0 !=
start
2 .mode store
7 .submode store
stop

'If you'r surrounded, start spinning and shooting. If you can't win, at least give them some fight >:-)
cond
2 *.mode =
7 *.submode =
start
90 .aimdx
-1 .shoot store
start

'If you are searching and you get shot, look at the target and eliminate it
'cond
'*.mode 1 =
'*.shflav 0 !=
'*.shflav -2 !=
'start
'*.shang 2 div .aimdx store
'2 .mode store
'1 .submode store
'stop

cond
*.shflav 0 !=
*.shflav -2 !=
start
1256 *.shang sub .aimshoot store
8 .shootval store
-6 .shoot store
0 .shflav store
stop


'Domination dance =)))))
cond
*.totalbots *.totalmyspecies =
*.robage 0 >
start
0 .mode store
0 .submode store
0 .timer store
8000 6000 angle .setaim store
stop

cond
0 *.mode =
0 *.submode =
*.hit 0 =
*.xpos 7000 <
*.xpos 9000 > or
*.ypos 5200 < or
*.ypos 6800 > or
start
15 .up store
stop

cond
0 *.mode =
0 *.submode =
*.xpos 7000 >
*.xpos 9000 <
*.ypos 5200 >
*.ypos 6800 <
start
628 .aimdx store
1 .submode store
stop

'Unstuck your self
cond
*.fixed 0 !=
start
0 .fixpos store
stop

'Call for help if injured
cond
*.nrg 500 <
start
4515 .out1 store
stop

cond
*.nrg 500 >=
start
0 .out1 store
stop

end
Hope you like him =)
« Last Edit: May 02, 2014, 01:27:42 PM by Botsareus »

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Hunter v.5
« Reply #1 on: November 02, 2008, 04:30:04 PM »
Well the best way to see how your bot is doing is by running it with the settings you like.
But if you want to compete with it you need to use the setting for the league you want it to fight in.
It looks like your bot qualifies for the F2 league... but I'm afraid it didn't get far.
It also didn't get far in the F3 league, wich sugests that you have a bug in your bot...
To run a league you can download the league file and bots in the league topics, then just select that league under "Restart and league".

You can also just run 2 bots against eachother from the same menu... you could start with some of the evo bases, or some of the bots from the F3 league.
But it looks like you're trying to fly before you've crawled... I would recomend starting out by getting all the basic combat related genes to work in a simple bot before building a system for memmory and all that. Atleast if you wan't to compete in the leagues with it...
And the first complex system I would recomend working on (Or stealing ) would be the eyes... eye5 is one narrow eye out of 9 eyes (You can see the eyes when you have a bot selected).
(You're welcome to steal whetever you need from any bot I ever made, but the eyes in Spinner are flawed, however theres a working version of the same eye system in Quickdraw where the eyes have been fixed. It's not very costs effective yet though, need to SG'fy it)

Offline Darwin226

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Hunter v.5
« Reply #2 on: November 02, 2008, 04:43:00 PM »
Thanks for the advice.

0.7 is getting quite smart actually.
It uses all 9 eyes and all.

Will improve it .

You know in one sim they mutated and started following each other (I can see how it happened) and attacking together.
It never happened again but it gave me the idea.

I know pack hunting or something like that was done before but is it efficient?

And I don't mean pack hunting which Etch uses (damn swarms....).

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hunter v.5
« Reply #3 on: November 02, 2008, 05:18:02 PM »
Another bot in development, hmmm.

A suggestion.
I think the beastery is more something for finished bots. I think the Bot Tavern is a better place to start a bot in development-topic. Just to have a strict line between league-bots and in develop-bots.

What is wrong with running before you've walked. I tried to do that too, you'll learn fast from it.  

I'm not sure how many genes you've got there. But be sure they don't walk too much into each other. That can really cause a loss in fighting power.(One gene saying left, and the next saying right)


I don't use modded special eyes, special eyes are for wimps that think you can't see properly with the normal eyes.

Well pack-hunting could provide some extra strength. Swarm does use a pack hunting. It is now still second in F3.
Oh my god, who the hell cares.

Offline Darwin226

  • Bot Neophyte
  • *
  • Posts: 18
    • View Profile
Hunter v.5
« Reply #4 on: November 03, 2008, 11:41:32 AM »
Yes. Now that you mention it, it would be better if I put it in bot tavern. Thx

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: Hunter v.5
« Reply #5 on: May 02, 2014, 01:28:35 PM »
Sorry, robot too suckish for F1.