Darwinbots Forum
Welcome To Darwinbots => Newbie => Topic started by: Siegfried on December 20, 2008, 05:12:55 AM
-
Hello everyone, im new to this but I must say this program has excited me and I´ve been doing a bot for two days now, must say most of the genes I copied them from better bots but I understand almost all the language now and been doing modification over those copied genes, so , here it is, ive called Harvester is pretty simple, no tricks at all just plain simple search and fight!
'
'HARVESTER OF SOULS
'
'By Siegfried
'
'A SINGLE FIGHTER BOT
'
'Genes 1/2 PURSUE FAR AND NEAR ENEMIES
'Genes 3 WAIT FOR PREY
'Gen 4 REPRODUCE
'Gen 5 BIRTH JUMP
'Gen 6 EVADE FAMILY
'Genes 7 IDENTIFY
'Gen 8 REAR-DEFENSE
'Gen 9 TIE-DEFENSE
'
' Gene 1. PURSUE FAR ENEMY
cond
*.in1 20 !=
*.eye5 0 >
start
*.refxpos *.refypos angle .setaim store
*.refvelup 30 add .up store
*.refveldx .dx store
*.refvelsx .sx store
stop
' Gene 2. PURSUE AND SHOOT NEAR ENEMY
cond
*.in1 20 !=
*.eye5 50 >
start
*.refxpos *.refypos angle .setaim store
16 .shootval store
-1 .shoot store
*.refvelup .up store
*.refveldx 5 add .dx store
*.refvelsx 5 add .sx store
stop
' Gene 3. WAIT FOR PREY
cond
*.eye5 0 =
start
0 .fixpos store
314 rnd .aimdx store
stop
' Gene 4. REPRODUCE
cond
*.nrg 7000 >
start
60 .dn store
30 .repro store
*.waste .shootval store
-4 .backshoot store
stop
'Gene 5 BIRTH JUMP
cond
*.robage 0 =
start
60 .dx store
stop
' Gene 6. AVOID FAMILY
cond
*.in1 20 =
*.eye5 50 >
start
90 .aimdx store
stop
'Gene 7 Who am I?
cond
*.out1 20 !=
start
20 .out1 store
stop
'Gene 8 REAR-DEFENSE
cond
*.shdn 0 !=
start
180 .aimdx store
stop
'Gene 9 TIE-DEFENSE
cond
*.tiepres 0 !=
start
-1000 .tieval store
-1 .tieloc store
*.tiepres .deltie store
0 .tiepres store
stop
end
But now I need to know what version do you use in the leagues beacuse I really want to compete, ive been using 2.37.6 so far, I had the 2.44.1 but now its stucked, I want a new simulation but I cant delete a bot from the list becuse it says "Runtime error 380 invalid property value", ive reinstalled it but no luck, please I really want to play the newer one since this version doesnt have boy or venom or virus or shell or slime haha, only ties
-
the version the leagues are run on are v2.43.1L
you can find it the code section on one of the threads
it is pined so it should be near the top
and welcom, new bot makers are always appreciated
-
But now I need to know what version do you use in the leagues beacuse I really want to compete, ive been using 2.37.6 so far, I had the 2.44.1 but now its stucked, I want a new simulation but I cant delete a bot from the list becuse it says "Runtime error 380 invalid property value", ive reinstalled it but no luck, please I really want to play the newer one since this version doesnt have boy or venom or virus or shell or slime haha, only ties
In 2.44 running leagues is broken.
Quite some code for a fist try
-
Welcome!
Yeah, 2.44.1 is broken for me too. Here's a thread I started:
http://www.darwinbots.com/Forum/index.php?...ic=3029&hl= (http://www.darwinbots.com/Forum/index.php?showtopic=3029&hl=)
Where you can get the best versions of DB.
Nums- maybe we should sticky that thread or something?
-
tnx for the encouraging everyone!!, now ive tried my bot in the 2.43 and seems to be........ completely stupid hahaha, in the 2.36 destroys everything but in the newer seems to be really slow and becomes really tiny, ill work with it so it can defeat the F3 league, its gonna take a while I guess, but, I REALLY NEED HELP WITH SOMETHING, I need somebody to teach me how to use the OR, AND, ELSE commands or whatever, its obvious what they mean but I need examples of the sintax before I can implement them, sorry if this seems stupid to somebody but im really new into programing , I dont know any language....
-
I'm not sure that else is still working, it was ment to work together with the condition part of a gene, but I think it's broken.
You should also know that everything in the condition part of a gene gets and'ed together.
Other than that the operator work like regular boolean operators but using reverse notation.
So basicaly you start by pushing 2 values into the boolean stack and then you choose to and/or them.
Ex :
X Y !=
Y Z =
and
Will trigger if X != Y and Y = Z
And ofcourse this notation can get a litle confusing if you need to mix many conditions.
like :
X Y !=
Y Z =
and
X Y >
or
means if (X != Y and Y = Z) or (X > Y)
X Y !=
Y Z =
X Y >
and
or
means if (X != Y) and (Y = Z or X > Y)