Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Testlund

Pages: 1 ... 4 5 [6] 7 8 ... 105
76
DNA - General / Re: Aiming/moving problems
« on: September 15, 2014, 05:00:06 PM »
What is the number 50 here supposed to do. You mean .aimsx, not .turnsx, right? If I use this the bot will just turn, not move away:

cond
*.eyef 0 >
start
628 .aimsx store
1 50 store
stop

But I found if I use .dn instead the bot will get away better.

cond
 *.eyef 0 >
start
 64 .dn store
 *.refxpos *.refypos .setaim store
 628 .aimdx store
stop



77
DNA - General / Re: Aiming/moving problems
« on: September 15, 2014, 03:38:16 PM »
It doesn't execute the code in the correct order! I want the bot to set the angle, then turn around and THEN move!

cond
 *.eyef 0 >
start
  *.refxpos *.refypos angle .setaim store
 628 .aimdx store
 64 .up store
stop

It doesn't matter which order I place the code. The bot always moves forward before it turns!  :blueblob:

78
DNA - General / Aiming/moving problems
« on: September 15, 2014, 02:43:40 PM »
EDIT: Blah-blah-rant...

Code: [Select]
The correct code is posted below!

                ||
                ||
                ||
              \\||//
               \\//
                           

79
DNA - General / Re: .sexrepro
« on: September 15, 2014, 09:04:16 AM »
Looks like it does.  :happy:

Soon after a bot has been hit by a -8 shot it will reproduce automatically if it has this gene:

start
 50 .sexrepro store
 2 .gender store
stop

No "cond" required.

80
DNA - General / .sexrepro
« on: September 15, 2014, 07:33:14 AM »
I'm not clear on how ".fertilized" and ".sexrepro" works together. I suppose this is wrong:

cond
 *.fertilized ? Uuh
start
 50 .sexrepro store
 2 .gender store
stop

I understand that ".fertilized" is a sort of timer. Does that mean ".sexrepro" is executed automatically when the timer reaches 0?

81
Internet Mode Commentary / Re: Who else is online?
« on: September 14, 2014, 06:58:14 PM »
Interesting graph. There's some action going on there and they take turns dominating the sim.

82
DNA - General / Re: Eye template
« on: September 14, 2014, 09:54:56 AM »
OK, I think this is good enough. The rotating eyes will stop after 32000 cycles but the eye sweeping will continue.

Code: [Select]
'============
'EYE TEMPLATE
'============
'
'.eye1 through 9 are located clockwise in numerical order.
'
'Positive numbers are anti-clockwise and negative numbers are clockwise.
'
'Default positions of the eyes are:
'
'.eye1 = 140
'.eye2 = 105
'.eye3 = 70
'.eye4 = 35
'.eye5 = 0
'.eye6 = -35
'.eye7 = -70
'.eye8 = -105
'.eye9 = -140
'
'Eye width:
'
'Smallest = -34
'Default = 0
'Widest = 1221
'
'Below is an example of eye settings.
'
'=====================
'Maximum surveillance:
'
def robagemult 50
def robage1 51

start
 50 .eye5width store
 240 .eye4width store
 240 .eye6width store
 277 .eye1width store
 277 .eye9width store
 -20 .eye3width store
 -20 .eye2width store
 -20 .eye7width store
 -20 .eye8width store
stop

start
 145 .eye4dir store
 -145 .eye6dir store
 333 .eye1dir store
 -333 .eye9dir store
stop

start
 *.robage .eye3dir store
stop

start
 *.robage sub .eye2dir store
stop

start
 *.robage .eye7dir store
stop

start
 *.robage sub .eye8dir store
stop

'The next four genes makes it possible to sweep the eyes beyond 32000 cycles.
start
 *.robage 9 mod 4 sub .focuseye store
stop

start
*.robage1 *.robagemult 32000 mult add *.robage add 9 mod 4 sub .focuseye store
stop

cond
*.robage 32000 =
start
.robage1 inc
stop

cond
*.robage1 32000 =
start
0 .robage1 store
.robagemult inc
stop

'The gene below puts the eyes back in their default positions.
cond
 *.robage 32000 =
start
 0 .eye1dir store
 0 .eye2dir store
 0 .eye3dir store
 0 .eye4dir store
 0 .eye6dir store
 0 .eye7dir store
 0 .eye8dir store
 0 .eye9dir store
 0 .eye1width store
 0 .eye2width store
 0 .eye3width store
 0 .eye4width store
 0 .eye5width store
 0 .eye6width store
 0 .eye7width store
 0 .eye8width store
 0 .eye9width store
stop

end

83
DNA - General / Re: Eye template
« on: September 14, 2014, 08:21:26 AM »
it doesn't seem to be storing anything in .robagemult though

So it seems. Your example doesn't work beyond 32000 cycles either.

84
DNA - General / Re: Eye template
« on: September 14, 2014, 07:55:02 AM »
I'm getting the same problem here. The first instruction to move forward is carried out, but not the second where it's supposed to move backwards.

Code: [Select]
def robagemult 50
def robage1 51

start
 *.robage1 *.robagemult 32000 multi add 32000 add
stop

cond
 *.robage 32000 =
start
 .robage1 inc
 .up inc
stop

cond
 *.robage1 32000 =
start
 0 .robage1 store
 .robagemult inc
 .dn inc
stop

85
DNA - General / Re: Eye template
« on: September 14, 2014, 07:15:38 AM »
Testlund in a more serious programming language people always write 2 + 2 = 4 as 4 = 2 + 2, review my posts, good night.  :sleepin:

Yeah, I'm aware of the reversed polish notation or whatever it's called, otherwise I wouldn't have gotten this far. But I don't understand why the .robage2 instruction wasn't executed in my example.

86
DNA - General / Re: Eye template
« on: September 14, 2014, 07:00:53 AM »
Well, that's my problem. I suck at math. With these operators I can't figure out what exactly is being calculated, so it becomes all trial and error for me.

OK, let's see what I can do with your examples...

87
DNA - General / Re: Eye template
« on: September 13, 2014, 08:56:47 PM »
Cool! I'll try it out tomorrow. Let me just show you what I tried:

Code: [Select]
def robage2 998
def robage1 997

start
 *.robage *.robage1 32000 mult add 32000 mod
stop

cond
 *.robage 32000 =
start
 .robage1 inc
stop

cond
 *.robage1 256 =
start
  100 .mkpoison store
stop

start
 *.robage1 *.robage2 32000 mult add 32000 mod
stop

cond
 *.robage1 32000 =
start
 .robage2 inc
stop

cond
 *.robage2 256 =
start
 100 .mkvenom store
stop

I expected the bot to make venom at 64512 cycles but instead it made poison again like it did at 32256 cycles. Why is that?

I have to go to bed now. It's almost 3 am here.  :sleepin:

88
DNA - General / Re: Eye template
« on: September 13, 2014, 06:36:46 PM »
Wow! The bot gets a second childhood!  :D Thanks.

89
DNA - General / Re: Eye template
« on: September 13, 2014, 05:56:37 PM »
Uuuhh... I just realised that anything based on .robage only works for 32000 cycles.  :glare:

90
DNA - General / Eye template
« on: September 13, 2014, 05:35:36 PM »
I made this for myself to have a better grip on how it works, but maybe it can be helpful for others too.

Code: [Select]
'.eye1 through 9 are located clockwise in numerical order.
'
'Positive numbers are anti-clockwise and negative numbers are clockwise.
'
'Default positions of the eyes are:
'
'.eye1 = 140
'.eye2 = 105
'.eye3 = 70
'.eye4 = 35
'.eye5 = 0
'.eye6 = -35
'.eye7 = -70
'.eye8 = -105
'.eye9 = -140
'
'Eye width:
'
'Smallest = -34
'Default = 0
'Widest = 1221
'
'Below is an example of eye settings.
'
'=====================
'Maximum surveillance:
'
start
 50 .eye5width store
 240 .eye4width store
 240 .eye6width store
 277 .eye1width store
 277 .eye9width store
 -20 .eye3width store
 -20 .eye2width store
 -20 .eye7width store
 -20 .eye8width store
stop

start
 145 .eye4dir store
 -145 .eye6dir store
 333 .eye1dir store
 -333 .eye9dir store
stop

start
 *.robage .eye3dir store
stop

start
 *.robage sub .eye2dir store
stop

start
 *.robage .eye7dir store
stop

start
 *.robage sub .eye8dir store
stop

cond
 *.robage 2
start
 0 .focuseye store
stop

cond
 *.robage 4 mod 0 =
start
 -1 .focuseye store
stop

cond
 *.robage 4 mod 1 =
start
 1 .focuseye store
stop

cond
 *.robage 5 mod 0 =
start
 -4 .focuseye store
stop

cond
 *.robage 5 mod 1 =
start
 4 .focuseye store
stop

cond
 *.robage 6 mod 0 =
start
 -5 .focuseye store
stop

cond
 *.robage 6 mod 1 =
start
 2 .focuseye store
stop

cond
 *.robage 7 mod 0 =
start
 -2 .focuseye store
stop

cond
 *.robage 7 mod 1 =
start
 3 .focuseye store
stop

end

Pages: 1 ... 4 5 [6] 7 8 ... 105