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 - Chlorate

Pages: [1]
1
Newbie / Enemy Recognition.
« on: May 05, 2010, 03:06:57 PM »
I checked that the variable "current" exists by looking it up on the bot's memory, and yes the little red edge marker does move to the relevant eye when something is in its field of view. I built the code up gene by gene testing that they were working ok.

Thanks for the help though, I'll probably have a look at that one sometime. Currently fiddling with something else for the time being.

2
Newbie / Enemy Recognition.
« on: May 05, 2010, 01:13:44 PM »
Hmm, ok here's the whole code.
Apologies for it being really quite inefficient code, it's a work in progress and has a couple of bits that haven't been implemented yet:

Code: [Select]
cond
 *.robage 0 =
start
 3 475 store
 def current 101
stop
 
'2 Eye Position
cond
start
 628 .eye3dir store
 90 .eye1dir store
 -628 .eye7dir store
 -90 .eye9dir store
stop

'3 Focus eye position determination: target left
cond
 *.eye5 0 =
 *.eye1 0 >
 *.eye2 0 > or
start
 -4 .current store
 *.current .focuseye store
stop

'4 eye 1 or 2 is closer
cond
 *.current -4 =
 *.eye2 *.eye1 >
start
 -3 .current store
 *.current .focuseye store
stop

'5 target right
cond
 *.eye5 0 =
 *.eye8 0 >
 *.eye9 0 > or
start
 4 .current store
 *.current .focuseye store
stop

'6 8 or 9 closer
cond
 *.current 4 =
 *.eye8 *.eye9 >
start
 3 .current store
 *.current .focuseye store
stop

7 conditional statement
cond
 *.eye5 0 =
 *.eye1 add *.eye2 *.eye8 add *.eye9 >
start
 -4 .current store
else
 4 .current store
stop

'8 Turn to face
cond
 
 *.eye5 0 =
 *.focuseye 0 !=
 *.eye1 *.eye2 add 0 >
 *.eye8 *.eye9 add 0 > or
 *.refeye *.myeye !=
start
 *.focuseye -30 mult .aimsx store
stop


'9 focus on eye5
cond
 *.refeye *.myeye !=
 *.eye5 0 >
 *.eye5 *.eye1 add *.eye2 >
 *.eye5 *.eye8 add *.eye9 >
start
 0 .aimdx store
 0 .current store
 *.current .focuseye store
stop
end

3
Newbie / Enemy Recognition.
« on: May 05, 2010, 12:14:31 PM »
But the target bot is being looked at by the focus eye, as I mentioned before I wrote some code that switches the focus eye from eye5 to whichever has the closest bot to it.

Forgive me if I turn down your favour, but I've only been at this for a couple of days now, and I'm still trying to understand the basic syntax.
Thanks anyway.

4
Newbie / Enemy Recognition.
« on: May 05, 2010, 11:39:57 AM »
Thanks for the boot in the right direction.

Although I couldn't make head nor tail of OCULUS II.  

So now I've written the code that makes my bot focus on the nearest object, however I still can't get it to not turn to face members of its own species.

Here's the bit of code responsible for turning the bot:
Code: [Select]
'8 Turn to face
cond
 *.refeye *.myeye !=
 *.eye5 0 =
 *.focuseye 0 !=
 *.eye1 *.eye2 add 0 >
 *.eye8 *.eye9 add 0 > or
start
 *.focuseye -30 mult .aimsx store
stop

Any more pointers would be appreciated, this is getting quite infuriating now  

5
Newbie / Enemy Recognition.
« on: May 04, 2010, 07:37:49 PM »
So I've been fiddling around with a bit of code for a while, as I mentioned in my greeting message, so my bot uses more of its eyes to find food instead of spinning and moving around randomly.

So my bot's eyes are set up like so:
Code: [Select]
cond
start
 628 .eye3dir store
 90 .eye1dir store
 -628 .eye7dir store
 -90 .eye9dir store
stop

Eyes 3 and 9 aren't doing anything right now, but I'm considering doing something with them later.
Eyes 1 and 9 are moved further apart slightly to give a wider field of view.

I've set it up so that if it sees something in eye 1 or eye 2 (or indeed eyes 8 or 9), but not in eye 5 it'll turn to face it.
However no matter what I try, I can't make the bot not turn to face a member of its own species and as a result they'll often end up going around in circles with each other and getting eaten.

Here's an example of what I've been trying:
Code: [Select]
cond

 *.refeye *.myeye !=
 *.eye5 0 =
 *.eye1 0 >
 *.eye2 0 > or

start
 100 .aimsx store
stop

Does the condition  *.refeye *.myeye != only work if it's referring to a robot in view of eye5?

I've been scratching my head and not getting very far because of this problem, can anyone hint as to what may be wrong?

Thanks.

6
Newbie / Greetings
« on: May 03, 2010, 06:59:56 PM »
Hello there!
Discovered you at the silly early hours of yesterday morning, and found it to be really rather addictive (once I'd wrapped my head around some of the funnier bits of the code)  

I've made couple of basic robots so far, mostly just modifications of Animal Minimalis with bits and pieces added here and there.
Although I did start to have lots of fun with viruses, in particular retroviruses and watching docile Alga evolve into a swarm aggressive and near-indestructable monsters that flooded the field.

Currently working on my first completely own-written (ok...there's a little bit of Animal Minimalis in there shhh) robot which is trying to make use of most of its eyes to search for food. May post it somewhere if I'm feeling particularly proud...or something goes horribly wrong, either or.

So anyway, hello Darwinbots forum  

Pages: [1]