General > Bot Challenges
Bot Challenge!
Light:
ooh this sounds like fun, might put some energy into DB, that seems to have been missing recently
EricL:
--- Quote from: Jez ---Meanwhile, tieang seems to only return a value of 0 and my current value of fixlen on the last incarceration of a 'bot on a string' has reached a fixlen value of 20450 without actually changing the tie length. Plus fixang doesn't change the direction my bot faces, it always faces to the right, the same angle it started at, rather than the desired affect of always facing away from the tie.
--- End quote ---
If you post a sim, I'll take a look. A sim makes make life easier, lets me verify the bot code is correct, etc. Thanks.
Jez:
It's the sim posted above with this bot dropped to the left of the bottom yellow bot, so that it gets caught. It's probably my code so appologies in advance.
cond
*.numties 0 !=
start
628 .fixang store
*.fixlen 50 add .fixlen store
stop
cond
*.numties 0 !=
*.eye4 0 >
*.tieang 628 =
start
*.tiepres .tienum store
51 .tieloc store
1 .tieval store
stop
end
EricL:
--- Quote from: Jez ---It's the sim posted above with this bot dropped to the left of the bottom yellow bot, so that it gets caught. It's probably my code so appologies in advance.
--- End quote ---
No worries. It is your code. First off, you need to set .tienum in gene 1 in order for .fixang and .fixlen to know what tie to operate on. Second, .fixlen gets reset to 0 by the simulator every cycle, so once you do set tienum in gene 1, the DNA as written will continously set the tie length to 50, not increase it as you want. You'll want to use a private sysvar or something like that. Cheers.
Navigation
[0] Message Index
[*] Previous page
Go to full version