Author Topic: my tryouts. Help plz  (Read 18988 times)

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« on: September 18, 2005, 01:25:43 PM »
ok I tried to design a search gene but for some reason it does not work were is the mistake?

cond
*.eye4 *.eye5 > or
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 > or
*.eye6 *.eye5 > or
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 >
start
*.eye1 3 mult *.eye2 4 mult add *.eye3 5 mult add *.eye4 6 mult add 10 div
*.eye9 -3 mult *.eye8 -4 mult add *.eye7 -5 mult add *.eye6 -6 mult add 10 div
add .aimsx store
stop

end

so what it should do, if any target is nearer then  the target in front it should
rotate based on the attractivity of the side. I weighted  the values to calculate attractivity.

Well in any case the rotation is to weak , but the real problem is it only rotates correctly clockwise never anticlockwise.
« Last Edit: September 18, 2005, 01:26:08 PM by Welwordion »

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
my tryouts. Help plz
« Reply #1 on: September 18, 2005, 02:17:34 PM »
I'm not certain but won't the first weighting calculation result get overwritten by the second?

I have split this one gene into two seperate genes and it works fine. There might be another way to keep it as one gene though; let some of the professionals have a look!
:D Ulciscor :D

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

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
my tryouts. Help plz
« Reply #2 on: September 18, 2005, 02:59:48 PM »
Turning genes always give me a headache.  Ugh.  There's a reason my bots all turn like a station wagon...

Anyway, just thought I'd post and say I looked it over.  I have nothing more to add than what Ulc has already said.

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« Reply #3 on: September 18, 2005, 04:50:00 PM »
how you seperated that? its one calculation I put in 3 lines
weight left
weight right(negative)
sum both together and store value
????? :huh:

bye the way if you write .aimsx 30 inc will the value in .aimsx be increased by thirty
(remember seeing something like that in purples tutorial but I am not sure.)
« Last Edit: September 18, 2005, 05:00:31 PM by Welwordion »

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
my tryouts. Help plz
« Reply #4 on: September 18, 2005, 04:54:16 PM »
Code: [Select]
cond
*.eye4 *.eye5 > or
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 >
start
*.eye1 3 mult *.eye2 4 mult add *.eye3 5 mult add *.eye4 6 mult add 10 div
.aimsx store
stop

cond
*.eye6 *.eye5 > or
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 >
start
*.eye9 3 mult *.eye8 4 mult add *.eye7 5 mult add *.eye6 6 mult add 10 div
.aimdx store
stop

Worked alright-ish for me anyway!
:D Ulciscor :D

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

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« Reply #5 on: September 18, 2005, 05:02:58 PM »
if you use .aimsx and then .aimdx does that not waste quite some energy?
turning 30 right only to turn 50 left?
note:I added an question about inc above

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
my tryouts. Help plz
« Reply #6 on: September 18, 2005, 05:06:42 PM »
Nope, inc increases a location by 1.

Quote
inc - Increments the value stored in a given memory cell by one. The memory location is defined by the top number on the stack which is then deleted.
Syntax - (330 inc) will increment the value stored in memory location 330 (.tie)
:D Ulciscor :D

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

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
my tryouts. Help plz
« Reply #7 on: September 18, 2005, 05:10:35 PM »
I beleive there may be a command to do what you're asking.  I'd have to double check to see if I removed it or not.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
my tryouts. Help plz
« Reply #8 on: September 18, 2005, 08:33:33 PM »
I think that's addstore.

2 30 addstore equivalent to *30 2 add 30 store

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« Reply #9 on: September 20, 2005, 07:35:37 AM »
ok I posted this already in multibots, but without finding the problem I can not  make any progress :/.
So its about the last gene why does it not make the veggie move?

cond
*.numties 0 =
*.multi 0 =
*.eye4 *.eye5 > or
*.eye3 *.eye5 > or
*.eye2 *.eye5 > or
*.eye1 *.eye5 >
start
*.eye1 3 mult *.eye2 4 mult add *.eye3 5 mult add *.eye4 6 mult add 10 div
.aimsx store
stop

cond
*.numties 0 =
*.multi 0 =
*.eye6 *.eye5 > or
*.eye7 *.eye5 > or
*.eye8 *.eye5 > or
*.eye9 *.eye5 >
start
*.eye9 3 mult *.eye8 4 mult add *.eye7 5 mult add *.eye6 6 mult add 10 div
.aimdx store
stop

cond
*.vel 30 <
*.multi 0 =
*.numties 0 =
start
30 *.vel sub 2 div .up store
stop

cond
*.eye5 50 >
*.refeye 0 =
*.numties 0 =
*.multi 0 =
start
20 .tie store
stop

cond
*.multi 1 =
*.numties 0 =
start
.dn .tieloc store
20 .tieval store
20 .tienum store
stop

end

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
my tryouts. Help plz
« Reply #10 on: September 20, 2005, 08:47:44 AM »
Quote
*.multi 1 =
*.numties 0 =
These two conditions are mutually exclusive. You can't be a Multi-bot and simultaneously have zero ties.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« Reply #11 on: September 20, 2005, 09:14:43 AM »
I know I already corrected that in my test version I use  but the result is the same
(otherwise the gene would not have activated when I looked at it)
« Last Edit: September 20, 2005, 09:15:13 AM by Welwordion »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
my tryouts. Help plz
« Reply #12 on: September 20, 2005, 10:25:26 AM »
I have asked this before but are your veggies "blocked" from the options panel.

If they are then they can't move.

Your code should work. I have used this loads of times.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Welwordion

  • Bot Destroyer
  • ***
  • Posts: 325
    • View Profile
my tryouts. Help plz
« Reply #13 on: September 20, 2005, 10:38:58 AM »
oh that you meaned by blocked ^^ and I always asked myself whats blocked meant in the options.
GREAT SORRY SORRY SORRY iam such a DUMB IDIOT!
  :(   :unsure:  :wacko:
« Last Edit: September 20, 2005, 10:40:20 AM by Welwordion »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
my tryouts. Help plz
« Reply #14 on: September 20, 2005, 11:07:02 AM »
Easy mistake to make.  ;)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D