Author Topic: Daunted newbie on the killer bot making tour  (Read 5514 times)

Offline spiceant

  • Bot Neophyte
  • *
  • Posts: 15
    • View Profile
Daunted newbie on the killer bot making tour
« on: January 30, 2006, 03:39:33 PM »
  • When I go to take a look at "the one" gen of chen I see only one gen and still its at the top of the F1 and SB League?
  • When exactly do bots die? I tried making a veggy that keeps on turning energy -> body but it explodes so often even though it doesnt run out of energy
  • what exactly are *.'s for? as seen in for example this condition: *.fx 0 != but sometimes there are multiple on one line of a condition like with: *.refaimdx *.myaimdx =
  • some tutorial links are red and when I click I am shown a screen where I can write the tutorial?!
I was also wondering if there are more sites (or programs) with helpfull newbie tutorials.
anyway hello community, I hope the questions dont go below the level of newbyness.

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #1 on: January 30, 2006, 03:50:33 PM »
Hi, welcome to Darwinbots.

It's very common to be intimidated by the DNA language  :P Any questions about it just ask.

So, questions:

1) Yep, Shen's bot 'The One' has just one gene - one gene bots are hard to program but very efficient and deadly - I've got one, it's called Una (Top of the shortbots league  :D )

2) Your veg probably dies because it is turning all its nrg into body

3) *s are sysvar referances: for example .dn is the adress for down (1 I think), while *.dn or *.body would read back a value from those locations

See this post

4) Wou mean the Wiki? Ask someone else  :wacko:

Hope that's useful

If you want to start making bots, I recomend you go here (Animal Minimalis tutorial) and here (PY's tuutorial)
« Last Edit: January 30, 2006, 03:55:05 PM by Elite »

Offline spiceant

  • Bot Neophyte
  • *
  • Posts: 15
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #2 on: January 30, 2006, 05:44:03 PM »
  • How do I turn off random mutations all together, either in all bots or just veggies?
  • I am currently using v 2.4.A and am getting crashes sometimes (runtime errors) of different kinds depending on the settings I set. is this the most stable ver?
  • what is body good for, other then size?
q 2) I wanted to know when bots die, other then when they run out of body or energy
and question 4) was referring to the wikipedia of darwinbots.com
« Last Edit: January 30, 2006, 05:45:13 PM by spiceant »

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #3 on: January 30, 2006, 06:05:53 PM »
Version 2.4 is a test version with lots of new features.  For the most stable (and most commonly used) version try 2.37.6

In that version (I don't know much about 2.4 version), you can turn off mutations for each species by clicking "Mutation rates" on "Species" tab and then clicking "Toggle mutations" button so that the text below it says "Muations disabled".

Body is good for storing energy (which was why it was originally introduced).  When you have excess - put it in body, when you need some - convert some body back into energy.  Large body also makes your shots fly longer and hit harder.

Bots pretty much die only if they run out of energy. There is also a "shock death" which happens if a bot loses too much energy during a single cycle, but that does not happen too often.

Wikipedia is a work in progress, red links mean that the article has not been written yet, that is why it offers you to write your own.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #4 on: January 30, 2006, 07:05:31 PM »
2.4 was a huge leap forward, and as a result has a huge number of bugs.  If you're learning, stick with 2.37 so you know what to expect.  It's largely stable.

Development on 2.4 is more or less abandoned as I move the code to C++.  Most of the bugs in 2.4 are being fixed ipso facto during the transfer.

There are many tutorials that should be written and haven't been.  If you're good at writing, and you learn a bit about DNA programming, feel free to write up some of your own.

PY's tutorial is the most comprehensive, if a bit dated.  The Animal Minimalis tutorial I wrote myself and should be useful to get grips on the basic system and how they interact.

The only way to kill a bot that hasn't run out of either nrg or body is to cause a "shock" death.  This occurs if a bot loses half of its nrg in a single cycle, with some caveats to prevent shock death in small bots.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #5 on: January 31, 2006, 02:36:06 AM »
If your curious, I made a tutorial going over how to use math for conditions in Single Gene bots. These aren't really the best bots to begin trying to code, though.

Playing with the dna of an existing relativly simple bot is probably your best bet. Animal_minimalis is a decent one for that.

Offline spiceant

  • Bot Neophyte
  • *
  • Posts: 15
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #6 on: January 31, 2006, 04:17:31 AM »
so far I'v made the simplest of bots ie one that makes shell, body and slime and if I take a look at the energy it appears to work as it looses energy when above 3000 untill it has full shell/body or whatever which works completely ok, however is it possible to see if a bot has made shell or slime directly?

also I dont quite get another thing, how to for example make an action that will use (a+b)*c= body -> energy or a/(b+(c*d)) or for that matter anything that goes beyond a+b. single variables are ok but I dont quite get it from staring at any other bots.
is it possible to combine booleans (assuming true =1 false=0) into it, ie. [booleanA]*200+2000?

how can I expect math to occur here? I dont suppose div and mult go before add or sub, considdering the code nature of bots in DB.

one of the ant bots I downloaded (basicly made up of queen's and workers) works perfectly (makes big queen cells and active worker cells) in 2.4.A but rather odd under 2.37.6
« Last Edit: January 31, 2006, 04:18:31 AM by spiceant »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #7 on: January 31, 2006, 09:02:22 AM »
Hi Spiceant. Welcome to DB.

Quote
how can I expect math to occur here? I dont suppose div and mult go before add or sub, considdering the code nature of bots in DB.

Math in DB is similar to assembly language. It uses a stack system with 20 compartments. Whenever the program encounters a "sysvar" such as .up or a number like 26, it "pushes" the value onto the stack so that it fills up like a pile of pancakes.

Mathematical operators normally only act on the top two values in the stack so there is no hierarchy of math commands like you get in a calculator or in Excel.

Let's say the top of your stack looks like this..

Stack position...Value
  • 1
  • 56
  • 0
  • 2
You can only access the top two values. here are a few ways that the code will use them.

store
this will totally remove the top two values, then store the value in position 2 into the memory location stored in position 1. In this case it will store 56 into .up (memory position 1) and make your bot accelerete forward.

add
This will remove the top two values, then add them together and finally return them to the top of the stack. Top value will now be 57.

add mult
This will first do the same as add did but then it will again remove the top two values (now 57 and 0) and multiply them together, placing the result back on top of the stack. The stack will now only have two values, 0 and 2. Mult is very useful command to remove unwanted junk from the stack.

Does that make any more sense now or am I just digging a deeper hole?
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline spiceant

  • Bot Neophyte
  • *
  • Posts: 15
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #8 on: January 31, 2006, 06:57:52 PM »
if I replace a number of <500> everywhere in a DNA will it always be the same if I replace those with <200 300 add> (without the <>)?

when I use the tie functions that do not specificy that they affect other tied up bots (like  fixlen or fixang which adjust tie length and angle) will they limit their effects to the bot executing the functions? (so that adjusting angle doesnt make any or a 2nd bot swing somewhere as if it were hit by a bat)
if I want to change the angle of a bot's eye (in a multibot with hardened ties) do I have to use tie functions to make it happen?

do functions that involve angles always refer to the bots eye´s angle (in which direction its looking)?

how do I find values like venom, poison, slimy, shell, body or nrg points while a sim runs?

how do I get DB to always turn the 1rst bot I load turn yellow the 2nd blue 3rd purple and 4th red? or do I have to manually change the colors if they are similar to the color of other bots or DB's background, each time I load them? <-- suggestion :boing:

anyway iv been improving the tutorial bot to increase its body size according to a 5:1 ratio with nrg (5nrg=1body), it also wanders around if it doesnt see alien life and it also makes a bit of shell when it has a body and nrg surpluss. (it increases body/shell before repro-ing at 20K nrg)

league runs (50 each) showed each new gene improved performance compared to its ancestor, before I accepted it and moved on to another improvement.

edit: ill change the bot to considder variables more so it doesnt just depend on fixed values (like I did with the 5nrg/body ratio)
I also think of making it a battery bot that will in one or another way make the veggy a shell (and later slime to) so the bots ancestors cant hurt it bad enough.

regards and goodnight everything :sleep2:
« Last Edit: January 31, 2006, 07:06:17 PM by spiceant »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #9 on: February 01, 2006, 10:02:51 AM »
Quote
if I replace a number of <500> everywhere in a DNA will it always be the same if I replace those with <200 300 add> (without the <>)?
yep

Quote
when I use the tie functions that do not specificy that they affect other tied up bots (like  fixlen or fixang which adjust tie length and angle) will they limit their effects to the bot executing the functions? (so that adjusting angle doesnt make any or a 2nd bot swing somewhere as if it were hit by a bat)
if I want to change the angle of a bot's eye (in a multibot with hardened ties) do I have to use tie functions to make it happen?

This sort of stuff is really unpredictable.  The physics engine in 2.37 is seriously incapable of handling this in a smooth and repeatable fashion.

Quote
do functions that involve angles always refer to the bots eye´s angle (in which direction its looking)?

Most do, yes.  I beleive .setaim and .aim are the exception (which measure angles from ---->)

Quote
how do I find values like venom, poison, slimy, shell, body or nrg points while a sim runs?

Open the console (by right clicking the bot and selecting that command).

Type ? .somesysvar to read back the value of that sysvar.

? .venom

I may be a bit off on syntax though, feel free to read the console help.

Quote
how do I get DB to always turn the 1rst bot I load turn yellow the 2nd blue 3rd purple and 4th red? or do I have to manually change the colors if they are similar to the color of other bots or DB's background, each time I load them? <-- suggestion :boing:

Manually, yes.  When you first load in a species a random color is assigned.  Be grateful, it sued to just assign black to all of them.  :P

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #10 on: February 01, 2006, 11:41:57 AM »
Quote
do functions that involve angles always refer to the bots eye´s angle (in which direction its looking)?


Most do, yes. I beleive .setaim and .aim are the exception (which measure angles from ---->)

in the case of .setaim, it goes counterclockwise ...
0/1256 = right, 314 up, 628 left, 942 down.
same for .aim ?
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #11 on: February 01, 2006, 01:47:44 PM »
yes, setaim and aim use the same orientation system.  The idea being that you can use something like:

*.aim 10 add .setaim store

to effect a small turn.

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Daunted newbie on the killer bot making tour
« Reply #12 on: February 01, 2006, 03:22:45 PM »
Quote
yes, setaim and aim use the same orientation system.  The idea being that you can use something like:

*.aim 10 add .setaim store

to effect a small turn.
ah. yes ... nice.

hey ... any of you folks who know the DNA/Bot code and
what the commands do are invited to come help write up
some descriptions for the operators at the wiki.

in fact, .aim was one of the ones we didn't have
much on. so I'll add the above to that.

any of them that don't have a description or that
info or examples could be added to would be great.
as accessed from
http://www.darwinbots.com/WikiManual/index.php?title=Sysvars
or
http://www.darwinbots.com/WikiManual/index...tle=Sysvars2.21
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]