Welcome To Darwinbots > Newbie

inline conditions

<< < (3/3)

Shasta:

--- Quote from: ikke ---a)   everything between start and stop is only executed if cond is met
--- End quote ---
This is how it is, you can test it by putting something like this in.

--- Code: ---cond
*.eye5 50 >
*.refeye *.myeye !=
start
314 .aimdx store
true
-1 .shoot store
stop
--- End code ---



--- Quote from: jknilinux ---Wow, that's really helpful! Thanks Shasta!  
--- End quote ---
Thanks, its not to bad once you have it figured out. This is actually how I have written most of my recent bots (though I do use a slightly less boolean stack based approach sometimes)

peterb:
here is a large single gene bot I made.
There are more functions in it then I acutaly use.
Its kinda a construction kit for many of my bots.

what might be intresting of it are the various functions on top.
Note that where I use def. (which cannt be used in viruses I asume)
YOu can use direct memoery adressing
Like
25 .100 store

stores 25 at mem position 100
you can use it again by referencing *.100

d-EVO:

--- Quote from: Shasta ---Also, a few tips to make it a bit more effective, put in a range check before it starts to shoot (*.eye5 < WhatEverDistanceYouWant), change the rotate value so it always makes a certain amount of turn (314 .aimdx is 1/4 of a revolution)
--- End quote ---

I did know that. just wanted to see if it worked. way beyond animal minimalis. Working on neural nets now.

Edit: and thanks, you did help me

Navigation

[0] Message Index

[*] Previous page

Go to full version