Author Topic: Infinite Loops  (Read 11007 times)

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Infinite Loops
« on: July 23, 2005, 07:08:14 PM »
Is it just my imagination or are the primary mutations we see actions that are continually pepretrated. Some examples are continual shooting, tieing, moving, stopping, etc. All of these have one thing in common, they happen every single cycle and are extremly easy for the dna.

Our own "intellegent" code takes advantage of just that, intelligence. The problem is that evolution and mutations don't work according to it. The specific instructions we give, while the epitome of human ingenuity, are when mutated are some of the worst things a bot can do or not do (shooting the bots primary method of feeding is a good example). Most of the time they're better off disabling the gene or getting rid of the dna altogether, simply to ensure mutation survivability.

I'm not sure how to really solve this. My guess it's more of a matter of understanding what the program is trying to do and then improve it to help the bots succed.

On this note the 64001 (32000 2 mult 1(zero) add) possible store locations are a bit much IMO. I get a value around 0.01561 chance of a given number actually being something even possibly usable (999/64001). The number of actual locations and evolution effecting behaviors is even smaller, most likely leading to some long times between mutation effects and actual observable evolution.

I was originaly thinking that a simple duplicate -999 set would help, but perhaps even that was too little, what I'm not thinking of would be to normalize to a usable value say 31078 to something like 78, not a direct effect but at least it's somewhat usable to the bot in this form. I can understand the comments about loss of diversity, but having so many wasted locations is overkill.

Endy :unsure:

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Infinite Loops
« Reply #1 on: July 23, 2005, 10:01:25 PM »
Perhaps we're just looking at it from the wrong point of view.  Instead of thinking that the store command is used for storing values, maybe we imagine that it's used for removing values from the stack, and sometimes, if everything is just so, it removes values and makes the bot do something.

In the new version the bot will be able to mutate some of the new commands, which will probably be useful for bots creating a kind of conditionless gene, which seems to be the direction that mutations tend to use.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Infinite Loops
« Reply #2 on: July 24, 2005, 12:33:38 PM »
Num, to make bots still interested in conditions add or xor and not, and all the special stuff !~=  ~>= all thouse waird conditions.  I think a bot should choose this because its faster then evolving it from junk dna. The junk dna really never produces anything usefull.  Warning: I will write about junk dna in detail in another post.

My point is don't think that junk dna is actualy the robot trying to produce somthing from Shens world of killer monsters.
« Last Edit: July 24, 2005, 12:34:28 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Infinite Loops
« Reply #3 on: July 24, 2005, 01:19:14 PM »
Mutations can produce all the new stuff in the new version.  What I mean is that I haven't ever seen conditions mutate to limit the execution of a gene beyond always on or always off.

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Infinite Loops
« Reply #4 on: July 24, 2005, 07:13:00 PM »
Quote
My point is don't think that junk dna is actualy the robot trying to produce somthing
I didn't think the bot was actually trying to mutate anything. It doesn't have a clue what it's doing it just gets given extra code and it can't do a thing about it.

Would it be possible to have a bot that monitored for genes that were bad or just useless and deleted them? I have heard of genes switching off genes with methylation or something similar.
« Last Edit: July 24, 2005, 07:14:13 PM by Ulciscor »
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Infinite Loops
« Reply #5 on: July 24, 2005, 11:26:28 PM »
Quote
In the new version the bot will be able to mutate some of the new commands, which will probably be useful for bots creating a kind of conditionless gene, which seems to be the direction that mutations tend to use.

Yep I've seen the same things, semi-conditionless behaviors, or even nearly completly random behaviors(note nearly does not mean completly random, I've tried delibritly adding a completly rnd command with dismal failure).

The problem is that the bot's can't currently track which genes cause what effects. It's also difficult to tell which mutations are bad for a specific enviroment. For example something as dramatic as continual reproduction, which results in a huge group of offspring, could be useful in an enviroment with an abundance of food or other bots limiting the growth.

Some method to block "bad" commands might be useful but I can't imagine how to go about doing that or how a bot could tell what is or is not a bad command.

Just a thought, some sort of powerful "blocking storage to memloc" command could accomplish this to a degree, but the cost of such a command should be equivalently high(although even this could be equally good or bad to mutate <_< ).

Darn, times up tonight. Won't be able to get back on for a few weeks at least :(

Have a good one. Hopefully the new vers will be out by the time I get back.

Endy B)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Infinite Loops
« Reply #6 on: July 24, 2005, 11:30:42 PM »
Quote
I didn't think the bot was actually trying to mutate anything. It doesn't have a clue what it's doing it just gets given extra code and it can't do a thing about it.
Semantics aside, my point is that I've never seen bots learn to regulate gene expression through the conditions in genes.  Bots tend to garbel up the distinction between genes.

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Infinite Loops
« Reply #7 on: July 25, 2005, 12:18:23 AM »
Sorry if I was being pedantic I was just trying to work out what people were saying. I have this thing at the moment where if a sentence is too long my brain just gives up halfway through.  :wacko:

Quote
Bots tend to garbel up the distinction between genes.

I am at a bit of a loss here. What could be done?
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Infinite Loops
« Reply #8 on: July 25, 2005, 12:29:26 AM »
If you view it as undesirable, we could implement something that resets the stack between genes.  That'd do the job just fine.  I'd prefer to keep it as an option over default tho.

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Infinite Loops
« Reply #9 on: July 25, 2005, 12:35:45 AM »
Keeping it as an option would be good. Personally I don't see it as that much of a problem but other people seem to.
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Infinite Loops
« Reply #10 on: July 25, 2005, 09:24:37 AM »
Quote
Keeping it as an option would be good. Personally I don't see it as that much of a problem but other people seem to.

As an option, no problem but as a default it would mess up almost all of the complex functions that go into making a streamlined (low energy consumption) combat bot.  (See the simplebot tutorial for an example)
Pretty much every one of my top bots in the league use a system where they store a value on the stack based on some conditions. The value isn't used until a later gene in the genome. Clearing the stack removes this behaviour option and hugely limits the potential complexities of robots and evolution.

How about an option that wipes the stack at the end of the cycle? (Did you already do this Num? I know early versions allowed carry over.) I haven't yet attempted to design a bot that carries values over to the next cycle so that is no big deal. Most often a carried over value just fills the stack up and screws up the robot.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Infinite Loops
« Reply #11 on: July 25, 2005, 03:17:50 PM »
I believe I fixed the stack to not pass values into new cycles already, though in what version that was I have no idea.  (Probably the new one).

The way PYs better bots work seems to be the way that evolved bots, well, evolve.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Infinite Loops
« Reply #12 on: July 25, 2005, 03:23:54 PM »
Quote
I believe I fixed the stack to not pass values into new cycles already
Thought you had.

Quote
The way PYs better bots work seems to be the way that evolved bots, well, evolve.

Figures. A bot neither knows nor cares how a value gets onto the stack or even how long it has been there. He just uses it. That's the way evolution works.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Infinite Loops
« Reply #13 on: July 25, 2005, 03:36:37 PM »
I think its good to keep that loop of the stack thingy. Keep stack erasure as an option but leave it with the stack cycle loop as defult. I think the stack cycle loop is more natural.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Infinite Loops
« Reply #14 on: July 25, 2005, 03:49:01 PM »
We do have one difference from the old days.

At some time in the last few versions, Num changes the dynamic nature of the stack. I discovered this last week while working through a debugger for my "Snapshot" utility.
No longer do new values fall off the stack once it fills up, the way they used to.
Now they just push the whole stack down and displace the bottom value.

That was a bit sneaky Num. I kind of like it though.  :P
Maybe it is listed in the readme file but I hadn't noticed it.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D