Author Topic: Hello!!! =) looking for help!  (Read 3849 times)

Offline rica01

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Hello!!! =) looking for help!
« on: October 04, 2007, 05:48:39 PM »
hi! my name is Ricardo, and I'm not a bot >.>

I currently attend to the University of Costa Rica and I'm taking a class on automatas and compiles. One of my assignments is writing a paper on Artificial Life, so isearched a bit and I came up with DarwinBots.

I've seached around the program and tried to understand the DNA language and it seems to me as if it were a transation table of an automata.

Could someone help me or teach me or explain to me or anything lol about that transition table? how do the robots have a transition table (hence an automata)?

ANy kind of help will be appraciated. Thanks.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello!!! =) looking for help!
« Reply #1 on: October 04, 2007, 06:08:58 PM »
While most bots could probably be seen somewhat in light of a transition table, the DNA itself doesn't impose that sort of structure.  The DNA is best understood as a reverse polish notation calculator.  There were some HP and Texas Instrument calculators like this back in the day.  The DNA language is pretty much a for real, albeit simple, programming language that runs in its own virtual machine.

For a little story, I think I used Darwinbots for a report on Artificial Life I did as a Freshman in college.  This would be about a year before I "found" Darwinbots and started coding it.  It makes a pretty good demonstration for any oral presentations on Artificial Life you can give if you can find some good settings.

Offline rica01

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Hello!!! =) looking for help!
« Reply #2 on: October 05, 2007, 01:30:39 PM »
Quote from: Numsgil
if you can find some good settings.

hehe guess I wasn't the 1st and surely wont be the last!! XD

but what do you mean by good settings? I'm htinking in making one lil bot veggie and 2 lil bots that eat or stuff like that but I NEED to see a transition table or something related to an automata in there XD

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello!!! =) looking for help!
« Reply #3 on: October 05, 2007, 02:16:35 PM »
You can certainly code bots as FSMs.  You can even declare state variables to maintain the state and code genes to be conditional on what state the bot is in.  One can think of the DNA as specifying rules for state transition based upon environmental input.  e.g. If I see another bot smaller than I, move to an attack state otherwise if smaller than I move to a defense state.

There are no looping constructs in the DNA, each cycle is like a CPU clock tick of sorts, so bots can only make one state transition per FSM per cycle.  But bots can be coded with multiple FSMs - e.g. one for body management, one for direction and navigation, one for waste disposal, etc.  State transitions can occur in each one of the FSM each cycle.  At the extreme, each gene can be thought of as it's own FSM.   It's not table driven, but that is essentially what the DNA is - state transition rules which operate on memory array values.  The bot's memory maintains the state, whether you use DNA-defined custom variable locations, locations changed implicitly or explicitly by the DNA itself (.up, .dn, etc) or locations changed by enviromental circumstances (like the .eye sysvars).   The mem array defines the bot's state, the DNA the rules for state transitions.

Here's a trivial example.  Take a bot with the following gene:

cond
0 *.eye5 >
start
5 .aimdx store
stop

The bot has two states defined by the value of the .eye5 location in it's memory array.  Either it sees something and .eye5 is nonzero (lets call this state 0) or it does not and .eye5 is 0 (lets call this state 1).  If it does, the gene fires.  If does not, the gene does not.  When the bot sees something and is in state 0, the gene will fire, slowly turning the bot until it no longer sees anything, which will move it to state 1, where it sill stay until something comes into view again, which will move the bot back to state 0.

Hope that helps.
« Last Edit: October 05, 2007, 02:29:00 PM by EricL »
Many beers....

Offline rica01

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Hello!!! =) looking for help!
« Reply #4 on: October 05, 2007, 04:58:43 PM »
Quote from: EricL
You can certainly code bots as FSMs.  You can even declare state variables to maintain the state and code genes to be conditional on what state the bot is in.  One can think of the DNA as specifying rules for state transition based upon environmental input.  e.g. If I see another bot smaller than I, move to an attack state otherwise if smaller than I move to a defense state.

There are no looping constructs in the DNA, each cycle is like a CPU clock tick of sorts, so bots can only make one state transition per FSM per cycle.  But bots can be coded with multiple FSMs - e.g. one for body management, one for direction and navigation, one for waste disposal, etc.  State transitions can occur in each one of the FSM each cycle.  At the extreme, each gene can be thought of as it's own FSM.   It's not table driven, but that is essentially what the DNA is - state transition rules which operate on memory array values.  The bot's memory maintains the state, whether you use DNA-defined custom variable locations, locations changed implicitly or explicitly by the DNA itself (.up, .dn, etc) or locations changed by enviromental circumstances (like the .eye sysvars).   The mem array defines the bot's state, the DNA the rules for state transitions.

Here's a trivial example.  Take a bot with the following gene:

cond
0 *.eye5 >
start
5 .aimdx store
stop

The bot has two states defined by the value of the .eye5 location in it's memory array.  Either it sees something and .eye5 is nonzero (lets call this state 0) or it does not and .eye5 is 0 (lets call this state 1).  If it does, the gene fires.  If does not, the gene does not.  When the bot sees something and is in state 0, the gene will fire, slowly turning the bot until it no longer sees anything, which will move it to state 1, where it sill stay until something comes into view again, which will move the bot back to state 0.

Hope that helps.


Yeah that's kinda what I tough about states; that conditions were the transitions.

Tiny Question wtf is FSM? I'm not a native anglospeaker so I have a lil trouble reading contractions and initilas XD Finite State Machine

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello!!! =) looking for help!
« Reply #5 on: October 05, 2007, 05:27:32 PM »
Sorry.   FSM = Finite State Machine.
Many beers....

Offline rica01

  • Bot Neophyte
  • *
  • Posts: 4
    • View Profile
Hello!!! =) looking for help!
« Reply #6 on: November 21, 2007, 04:44:15 PM »
bump

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Hello!!! =) looking for help!
« Reply #7 on: November 22, 2007, 04:38:46 AM »
Why the...  did you bump, what don't you understand.

For information about dna and how it works.

Look at the wiki
The wiki

Look at the post before you, I have also put a link to dna-help in the wiki.
Dna question

If you really want to know how it works(the program itself), there is even some source code lying around, also in the wiki.

I hope the links help.
« Last Edit: November 22, 2007, 04:40:23 AM by Peter »
Oh my god, who the hell cares.