Author Topic: Need the right conditions  (Read 6105 times)

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« on: April 14, 2006, 08:44:27 PM »
ok first:

cond
*.function 0 =
*.swarming 0 =
*.refeye *.myeye =
*.eye1 *.eye2 add *.eye3 add *.eye4 add *.eye5 add *.eye6 add *.eye7 add *.eye8 add *.eye9 add 0 =
or
start
.out3 .tmemloc store
*.tmemval .out1 store
stop

Duid I use the or right? I want it to activate when it sees only his brethren or nothing.


second:

cond

start
.satposx .tmemloc store
*.tmemval .satposx store
stop

cond

start
.satposy .tmemloc store
*.tmemval .satposy store
stop

In order to move the tied unit will be killed, before that happens this information has to be stored.
However the surviving unit uses satposx and satposy usually for his own information storage.
So which cond to insert?
« Last Edit: April 14, 2006, 08:44:48 PM by Welwordion »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #1 on: April 14, 2006, 09:01:26 PM »
The first gene looks right.  As to the second,

it takes a full cycle between when you set tmemloc or memloc and when you can read the value back from tmemval or memval.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #2 on: April 14, 2006, 09:11:52 PM »
Well I could scream ^^, you think: lets just programm a basic ability and leave the rest up to evolution, but you end up with a smoking head trying to figure out how to make this ability work out.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #3 on: April 15, 2006, 12:25:35 AM »
I would use the in/out pair to commincate coordinates.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #4 on: April 15, 2006, 01:29:49 AM »
If the head has to face the eye(head and eye = parts of the multibot) to read this information, there is no purpose in making this a multibot

well in1 and out1 are for extern information exchange in3 and out3 for intern(head and eye) information exchange.
(probably I should use the racial memory)
« Last Edit: April 15, 2006, 01:27:32 AM by Welwordion »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #5 on: April 15, 2006, 02:03:26 AM »
Maybe you can use a combination of info shots and tmemloc/tmemval

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #6 on: April 15, 2006, 05:10:55 AM »
How large can the numbers be stored in memory location?
Because if I use modulo I can store two numbers into 1.
And how far can a bot see?
Because I can change the satpos(position of the information access) into satdistances and store this information into the last two digits of body and shell(which can be read by trefbody and trefshell)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #7 on: April 15, 2006, 12:11:02 PM »
The default seeing distance is 1440, or roughly 12 robot lengths.

The robot DNA uses 16 bit integers, which means a range of [-32000, 32000]

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #8 on: April 15, 2006, 01:37:14 PM »
Hmm seems like I have to rethink satcoordinates, best is I try out normal movement then I probably do not need these.
Well another question concerning conditions:
Will .in1 be zero or the last value stored into it, when the robot has nothing in sight.

(oh and thx that you help me so much  )
« Last Edit: April 15, 2006, 01:37:47 PM by Welwordion »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #9 on: April 15, 2006, 01:38:38 PM »
I believe, but am not 100% certain, that it will be the last value stored in it.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #10 on: April 15, 2006, 03:35:35 PM »
Although function and swarming are 0 out1 does not become the same value as out3
'
target choosing
'head uses his x coordinate
cond
*.function 0 =
*.swarming 0 =
start
*.out3 .out1 store
stop


Maybe out3 is deleted every turn and is only refilled after the whole code is read?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #11 on: April 15, 2006, 03:39:46 PM »
Hmm...

Try using a constant instead of *.out3 to make sure it's not another problem.

That looks like it should work.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
Need the right conditions
« Reply #12 on: April 15, 2006, 03:49:02 PM »
Tried to use *66 and 66 instead of *.out3 .out3 but no improvement.
(if you want to see the complete code just go into my communication network post I attached it as file(although thats probably a little long to read XD))

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Need the right conditions
« Reply #13 on: April 15, 2006, 05:11:56 PM »
No improvement meaning that *66 and 66 didn't work?

That would mean it's an issue with your DNA flow coding.  If it did make it better, that means it's an issue with the program.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Need the right conditions
« Reply #14 on: April 15, 2006, 07:03:17 PM »
just a quick tip here.

When you want to comunicate between bots that are joined by ties, simply use one bot to write directly to a memory location in the other. This is always done right at the start of the program loop so it will be acted upon immediately by the other bot if it is monitoring a specific internal memloc for instructions from the head.

Don't waste time and effort with tmemloc and tmemval. Just "poke' the value directly into the memory.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D