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

Pages: [1]
1
Bot Tavern / Rogue genes
« on: February 03, 2010, 05:41:49 PM »
O I see where I went wrong, the scan eye gene updated focuseye before the track gene had a chance to execute (and test it in the conditilon). So the solution is to put the gene which modifies the focuseye (scan eyes) after all genes which use it in a condition....duh  . Thanks guys, I kinda feel embarrassed at this oversight.

2
Bot Tavern / Rogue genes
« on: February 02, 2010, 10:08:59 PM »
I think I see the prob. Apparently the updating of eyef, memval lag behind the actual position of the focuseye (so my results lead me to conclude)
Here's what I did:

[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']'Scan eyes
cond
*.eyef 0 =
*.memval *.specIDloc = or
start
.up 10 *.velscalar sub sgn 0 floor mult dup inc inc
*.timer 9 mod 4 sub .focuseye store
*.memval 991 store
*.specIDloc 992 store
*.eyef 993 store
stop

'Center eye5 on prey
cond
*.eyef 0 !=
*.memval *.specIDloc !=
*.focuseye 0 !=
start
*.focuseye 140 mult .aimdx *.robage sgn mult store
0 .focuseye store
stop


'Track prey
cond
*.eye5 0 >
*.memval *.specIDloc !=
0 *.focuseye =
start
*.refvelup 50 add .up .sthreshold *.eye5 sub sgn 0 floor mult store
*.refxpos *.refypos angle .setaim *.robage sgn mult store
*.memval 994 store
*.specIDloc 995 store
*.focuseye 996 store
stop

'Gene X
cond
start
*.memval 997 store
*.specIDloc 998 store
*.eyef 999 store
*.focuseye 1000 store
stop

And I followed the memory changes in the robot DNA dialog box.
*ASB means as seen by.

(ASB scan eyes)        (ASB track gene)      (ASB Gene X)
memv  sID      eyef   memv sID      focus  memv sID    eyef focus
--------------------------------------------------------------------------
0         310      0       0        310     0        0        310    0     -1
0         310      0       0        310     0        0        310    0      0
310     310       9       0        310     0       310     310    9      1

Now the target bot was only visible in one eye (eye5) yet its ID only shows up in memval when focuseye = 1
Also eyef (when focuseye = 1, i.e. when eyef should = eye6) is equal to what eye5 is. Throughout everything I ensured that only eye5 could see the bot so it pretty conclusively shows that the updating lags (since at no point eye6 = 9).

The formatting changed from me typing to after it posted, so the columns of the table don't align as they should  Sorry about that.

[edit] While I make no assertions about when these stores occur (I think that's irrelevant) the last quadruplet is guaranteed to have been taken at the same time.

3
Bot Tavern / Rogue genes
« on: February 02, 2010, 08:57:16 PM »
Ok I'll go try that out now. Let you know the results

4
Bot Tavern / Rogue genes
« on: February 02, 2010, 08:04:44 PM »
I thought those sysvars where populated before the DNA even began executing. Its a surety that *.memval is equal to *.specIDloc or the scan eyes gene would not activate in that cycle. This is truly puzzling, I wonder if it has anything to do with instabilities in the beta version (or some detail I'm overlooking). In any case, if I can't find a cause/solution I'll just rewrite the conspec system

5
Bot Tavern / Rogue genes
« on: February 01, 2010, 08:12:50 PM »
Thanks for trying. It's really frustrating but I'll fiddle with it until it works (hopefully).

6
Bot Tavern / Rogue genes
« on: January 31, 2010, 12:12:58 PM »
I took a long break from darwinbots. Just reintroduced myself yesterday and I started a little bot to get re-familiarized with DNA programming. For the most part everything is working OK. Except there's a gene activating when it shouldn't. Here is the gene along with the other relevant ones:

Some defines
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
def specIDloc     972
def specID        310
def sthreshold    20  'Distance at which the effects of the tracking gene gets deactivated and the feeding gene activates


(These aren't contiguous)
This sets the species' ID
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
'Set spec
cond
*.robage 0 =
start
.specID .specIDloc dup .memloc store store
stop


The problem gene is in this section
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
'Scan eyes
cond
*.eyef 0 =
*.memval *.specIDloc = or
start
.up 10 *.velscalar sub sgn 0 floor mult dup inc inc
*.timer 9 mod 4 sub .focuseye store
stop

'Center eye5 on prey
cond
*.eyef 0 !=
*.memval *.specIDloc !=
*.focuseye 0 !=
start
*.focuseye 140 mult .aimdx *.robage sgn mult store
0 .focuseye store
stop

'Track prey
cond
*.eye5 0 >
*.memval *.specIDloc !=
0 *.focuseye =
start
*.refvelup 50 add .up .sthreshold *.eye5 sub sgn 0 floor mult store
*.refxpos *.refypos angle .setaim *.robage sgn mult store
stop

The problem is the track prey gene gets activated even when eye5 'sees' the same species (despite the *.memval *.specIDloc != condition), and starts to chase it.
The only thing preventing it from continuously tracking it's own species is that the scan eyes gene is still activated and changes the focuseye the next cycle. So it results in intermittent tracking (of its own species) every 9 cycles. This bot works fine for non-specs and even though it doesn't shoot it's own species (the feed gene doesn't activate for conspecs), it is a wasteful behaviour and I really can't see why this gene is activating. I've used to console to evaluate the conditions and in the cycle that the track gene gets activated it shows that *.memval = 310 and *.specIDloc = 310. Also is *.timer capped at 32000 like *.robage?

BTW: The eyes' position and width have been changed to provide even 360 deg. vision

7
Newbie / Ties not working for some reason
« on: July 24, 2008, 09:37:55 PM »
One other question why is the degree system in DB equivalent to radians multiplied by ~200.

8
Newbie / Ties not working for some reason
« on: July 24, 2008, 08:55:34 PM »
I agree the tie system is a little convoluted for my tastes here are my suggestions:

perhaps the tie system could be implemented with a tie ID stack where the system resets the stack to reflect all the current ties each cycle. Thus tie IDs can be popped until the stack is empty, and new ties are formed by pushing tie IDs unto the tie stack. For this to work obviously some new operands would need to be introduced to manipulate the tie stack. (tiepop, tiepush perhaps).Also backward compatibility would be maintained.

Since I havent viewed the source files im not aware of how feasible(programming wise) this would be for DB

Oh forgot. The stack could also implement a overflow push out policy where new ties push the bottom ties out thus breaking them or a overflow blocking policy where overflow blocks new ties.

9
Newbie / Ties not working for some reason
« on: July 24, 2008, 04:11:05 PM »
I see...

Quote
They can gleam it through .tiepres or intuit it as the the tie port for the last tie attached to them that they did not create is essentially *.numties.

I know you can use tiepres but what if you also fired a tie in that cycle which would it refer to, and would numties still be usable if I also have ties.

10
Newbie / Ties not working for some reason
« on: July 24, 2008, 03:50:38 PM »
That would be well appreciated. And again (It seems as of late my expressive skill have declined) what I meant was I saw somewhere that .refeye etc are persistent.

Also one quick question can bots delete ties they did not create and how would they address the tie. If they use the same ID as the creating bot then collisons(multiple ID aliased ties) would be a problem

And yeah I am having fun. I enjoy problem solving

11
Newbie / Ties not working for some reason
« on: July 24, 2008, 03:20:09 PM »
I will check out the memory consistency in my spare time with the console (I was trying to avoid that) and possibly update the wiki in my spare time. I was asking because somewhere I saw that the eye reference values are persistent even when the current focus eye 'sees' nothing causing basically a phantom bot.


Thanks for the help/suggestions (its so hard to spot coding errors sometimes when you program )

12
Newbie / Ties not working for some reason
« on: July 24, 2008, 02:47:15 PM »
Ah I see strangly when I first began coding I realized the alias and made a mental note to change it to ties must have slipped my mind.

I think you misunderstand what I said. What I mean is a list of sysvars which are persistent as far as I know the wiki doesnt explicitly state )for many vars) whether a var is maintained across cycles.

Thank you for the help!!!

13
Newbie / Ties not working for some reason
« on: July 24, 2008, 02:26:44 PM »
Ive been using DB for about 2 days now and I have a couple of questions and requests


1. Would anyone find time to post a list of all 'static' sysvariables. I need to know which ones change
2. Can anyone tell me why this bot refuses to shoot ties(it's not complete by the way)
3. if nrg is not maxed but the bot recieves nrg that will exceed the maxium is the difference converted to
    body. Or is excess nrg only converted to body when nrg = 32000 thus rendering the difference lost.


[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']' binary dormite
' Designed and refined by Bluchrome
' Atempt at a linear 2nd degree multibot
' the head feeds and the tail produces venom
' and poison and reproduces


' --------------------constants------------------

' types
def head 1003
def tail 1002
def notype 989
'not implemented as of yet

'conspec id
def conspec 230


'---------------memory locations----------------
def type 100
def tie 120
' unused right now
def hibernate 121
' 0 = not hibernating
' 1 = hibernating
' unused right now
def rotate 122
' 0 = rotate
' 1 = not to rotate
' set by the tie gene to prevent rotating before ties are formed




' -----------------initialize---------------------
'store initial bot type
cond
*.robage 0 =
start
.notype .type store
.conspec dup .out5 store
.tout5 store
stop


' -----------------body regulation------------------

' keeps the body at 1/3 of nrg as long as more than 900 body is there
' found this gene in the forums pretty neat modified it a bit

cond
*.body 900 >
*.nrg 32000 !=
start
*.nrg 3 div *.body sub .strbody store
stop


cond
*.body 900 <=
*.nrg 20000 >
start
100 .strbody store
stop

' ---------------- tie counter----------------------


cond
*.numties *.out10 !=
start
*.numties .out10 dup store .tout10 store
stop

'---------------despecialize-------------------------
cond
*.numties 0=
*.type .notype !=
start
.notype .type store
stop

' -----------------tie shooter---------------------
'disables rotating so that ties dont miss
cond
*.rotate 0 !=
start
0 .rotate store
stop


cond
*.numties 0 =
*.in5 *.out5 =
*.eye5 30 >
*.in10 0 =
start
.tie inc
.readtie inc
.rotate inc
stop

' --------------food finding---------------
'food finder

'only unspeciated or heads can find food
cond
 *.eye5 0 >
*.eye5 70 <
*.in5 *.out5 !=
*.type .notype =
*.type .head = or
start
*.refxpos *.refypos angle .setaim store
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

'--------------feeding----------------------
cond
*.eye5 70 >=
*.in5 *.out5 !=
*.type .notype =
*.type .head = or
start
4 .shootval store
*.refxpos *.refypos angle .setaim store
-1 .shoot store
*.refvelup .up store
stop



' -----------------idling--------------------
' aka search and destroy

cond
*.eye5 0 =
*.in5 *.out5 = or
*.robage 1 >
*.hibernate 0 =
*.rotate 0 =
start
*.aim 400 rnd 200 sub add .setaim store
30 *.vel sub 2 div rnd .up store
stop

'if hibernating dont roam just rotate
cond
*.eye5 0 =
*.in5 *.out5 = or
*.hibernate 1 =
*.rotate 0 =
start
140 rnd .aimsx store
stop


' ------------------counter(anti) tie------------------




'-----------------counter tie feed------------------
cond
*.tin5 *.out5 !=
*.trefnrg 0 >
start
-1 .tieloc store
-1000 .tieval store
stop

'-----------------hibernate genes----------------------
'bots cant hibernate till there 30 to prevent newborns from immediately hibernating
'because of lack of resources.
' Hibernated bots still look for food but they dont move anymore

cond
*.nrg 2700 <
*.hibernate 0 =
*.robage 29 >
start
.hibernate inc
stop

cond
*.nrg 9000 >
*.hibernate 1 =
start
.hibernate dec
stop

end



ive made a couple of tie feeders and they shoot just fine so what is the problem with him

Pages: [1]