Author Topic: A small idea to help make brainy bots  (Read 6766 times)

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
A small idea to help make brainy bots
« on: June 10, 2005, 04:36:48 PM »
Quote
cond
*.20 0 >
start
*.20 .up store
stop

Translation:

Quote
Lets say memory location 20 is equal to 310.

Thats means if the robot is not dead (.nrg > 0) it will move *.nrg .up store

I need this to make an effective "nerual network" bot.
« Last Edit: June 10, 2005, 04:40:22 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A small idea to help make brainy bots
« Reply #1 on: June 10, 2005, 04:47:45 PM »
It's an interesting idea.  I have a * operator that I've been working on that returns the value of the memory location pointed to by the top value on the stack.

So you could do *20 * to get the memory location *20 is pointing to.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
A small idea to help make brainy bots
« Reply #2 on: June 10, 2005, 04:51:06 PM »
Here is how this bot is supposed to work

The robot counts one memory location up every cycle we call this memory location "n"

The robot waits until it reproduces or until it kills another robot or until its energy is below 300..........

Basicaly we have a dna inside dna , after the robot reproduces or kills another robot it checks if it did better on time and energy then lest time. If it did then the sub-dna is saved as the "defult sub-dna", otherwise a new more mutated virsion of the "active sub-dna" is created out of the defult sub-dna.

Here is the model of sub dna (all this memory is used up twice , once for  defult sub-dna , once for active sub-dna)
(there are special genes that copy defult sub-dna into active sub dna and wise versa)

a(20) 'instruction number
b(20) 'instruction type

all conditions are ">"

c 'is condition top part  a number or a sysvar
d(20) 'condition top part value
e 'is condition buttom part  a number or a sysvar
f(20) 'condition buttom part value

then we go

cond
*.20
*.40
>
start
*60 *80 store
stop

cond
*.21
*.41
>
start
*61 *81 store
stop

somthing like that...
« Last Edit: June 10, 2005, 05:09:56 PM by Botsareus »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A small idea to help make brainy bots
« Reply #3 on: June 10, 2005, 05:01:38 PM »
EERRRMMMM???

*.20 won't work since the dot is only used to prefix a sysvar name.
*20 will return the value stored in memory location 20. It always has done.

so *60 *80 store will store the value in memory location 60 into the memory location pointed at by the value currently stored in memory position 80

If mem(60) contains 25 and mem(80) contains 1 then this will store 25 into position 1 (.up)

Unless I am reading the post wrong there is nothing difficult about any of this.
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
A small idea to help make brainy bots
« Reply #4 on: June 10, 2005, 05:04:50 PM »
Problem:
Quote
*.20 won't work
I need it to work.

I also revise my post above for lack of accurasy in design , brb.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A small idea to help make brainy bots
« Reply #5 on: June 10, 2005, 05:07:59 PM »
Quote
It's an interesting idea.  I have a * operator that I've been working on that returns the value of the memory location pointed to by the top value on the stack.

So you could do *20 * to get the memory location *20 is pointing to.
And didn't I just say this?

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
A small idea to help make brainy bots
« Reply #6 on: June 10, 2005, 05:12:12 PM »
I gess I have to this evey time:

cond
start
*20 * *12 store
*30 * *13 store
stop
cond
*12
*13
>
start
*60 *80 store
stop

genes are checked in order correct?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A small idea to help make brainy bots
« Reply #7 on: June 10, 2005, 05:16:45 PM »
I wish you'd use custom labels.  All these *numbers makes my head hurt.

Genes are executed linearly at the moment, yes.  In the future, it'll change so that the genes won't be able to tell who executed first or last except by passing values along in the stack.

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
A small idea to help make brainy bots
« Reply #8 on: June 11, 2005, 05:46:42 AM »
PY I think he wants *.20 to read the value of an address that is stored in *20, so if *20 has 30 stored in it, *.20 would read the value in address 30.

Hopefully Ive got the right end of tthe stick

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A small idea to help make brainy bots
« Reply #9 on: June 11, 2005, 11:02:55 AM »
In that case **20 would make more sense since the dot is only used as a prefix for a text name so that the parser can associate the actual number with it.
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
A small idea to help make brainy bots
« Reply #10 on: June 11, 2005, 11:17:45 AM »
And, as I said, I added a command in the latest version called "*", that reads the value of the memory location on top of the stack.

So 20 * does the same thing as *20.

So problem solved :lol:

Offline Light

  • Bot Destroyer
  • ***
  • Posts: 245
    • View Profile
A small idea to help make brainy bots
« Reply #11 on: June 11, 2005, 11:32:20 AM »
when you say the latest version you mean 2.37.2 or so new its yet to be released?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
A small idea to help make brainy bots
« Reply #12 on: June 11, 2005, 11:37:40 AM »
Yet to be released.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
A small idea to help make brainy bots
« Reply #13 on: June 11, 2005, 11:50:50 AM »
that still wouldn't give the value stored in the memory location pointed at by the value stored in the memory location pointed at by the value on top of the stack though..... would it?  :wacko:
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
A small idea to help make brainy bots
« Reply #14 on: June 11, 2005, 12:00:07 PM »
Well, you could do it multiple times since it's a command.

*20 * * gives the value pointed at by the value pointed at by *20.