Welcome To Darwinbots > Newbie

So many questions.

(1/2) > >>

Moonfisher:
Hey, I've only finished one bot so far (Ebola) which is just a frankenstein monster of large chunks of code I stole and pieced together with some extra stuff.
I'm working on new concepts from scratch now, but it seems like theres a lot of bugs in the latest versions (DB 2.43y and 2.43z).

It ocurs to me there's a lot here, so I'll add numbers.

Got a lot of questions, but first the bugs (If it's not just me screwing up) :
B1- Either the ref values or the angle operator is bugged. Seems like negative values or combinations of negative and positive values cause some sort of bug. Or something like that anyway.
B2- trefbody didn't work in DB 2.43y, not sure about 2.43z. (It's not useless, I realy needed it in my last (only) bot)
B3- delgene didn't work in DB 2.43y, but I think it got fixed in 2.43z
B4- performing operations on the memmory location no longer seems to work in 2.43z (Worked in 2.43y).
B5- when I run simulations it doesn't seem to take propper advantage of all the processors, although you would think lots of small processes would be idea to distibute... not sure if theres anything I can do to improve performance.


Now the questions :

Q1- I never see anyone using certain operators, so I'm wondering if they work at all. I'm refering to operators like ++ and | and ^ and such. I tryed .variable++ but that didn't seem to work, maybe it should be seperated by a space, but I'm generaly confused about this.

Q2- I'm also wondering if ~= and %= works, it sais they're depercated in the description. (Also sais they're not usefull, but I disagree  )

Q3- How does negation work ? I see examples where people use -1 mult, but from the description it would seem like this is the same as just writing - .

Q4- This brings me to my general confusion about the stack.
Q4.1#- When I write -1 mult, from what I can read I negate the value in the stack and muliply it by 1... Or would that be - 1 mult ?
Q4.2#- It sais I can have 20 values in the stack at one time, but as I understand it, if I write :
a b add c d add mult
Then I only have 3 values in the stack at one time, I have a+b in one "slot" and c and d in the 2 others, when peeking (When performing the last add before mult). Or do I actualy load all 4 values into the stack before performing any operations ?
If I understand correctly then :
a b c d mult mult mult
Would load 4 values into the stack before multiplying them, whereas :
a b mult c mult d mult
Wouldn't load more than 2 values into the stack at the same time.
Q4.3#- Just to verify if what I think is right :
When I write :
a b c d mult mult mult
The when I hit the first mult I take the 2 top values from the stack and add them together, these would then be c and d (since it's a stack) and the result would then be placed at the top of the stack, making the next 2 values b and c*d ... right ?

Q5- I noticed a lot of energy can be saved by "compiling" you code to eliminate conditions, is this intentional because natural evolution should be capable of optimizing the code, or should I be expecting costs on operators in the leagues ?

Q6- How many store comands can be excuted in one cycle ? And what actions can be performed at the same time ? Can I turn, accelerate, reproduce, comunicate through a tie, while making a new tie and shooting waste ? It just seems like eveything starts to fall appart when the dna gets too long. Is there a max nr of genes ? Max DNA length ?

Q7- If I write 50 .repro store and then 0 .repro store, will I reproduce ? Does the last or first value overide the other one ? I'm guessing the last value removes any previous ones and the first value is "destroyed" (So it won't intefere with anything).

Q8- When are memmory shots and tie comands executed ? I would guess it's at the end of the dna execution  ? And what about ties, same thing ?

Q9- When I tie to something, do I have to wait for the next cycle before I can interact with the tie, or does it appear right away ?

Q10- Can you perform several actions through a tie at the same time ? It seems like I can share energy while performing another action on the tie, like storing a value in a memmory location or trying to feed. But what if 2 bots are performing an action on the tie between them at the same time, can one bot share energy while the other one is comunicating back ? And if not then which one has the priority ?

As you can tell I'm confused about a lot

Also a sugestion, if you guy's don't want to mess around with the angle operator, you could just make cos, sin, tan, atan, atan2, asf...  available as operators
Would be nice for creating advanced aim functions

EricL:
Regarding the bugs:

B1 - I need more info than this.  Please see the guidelines on bug reporting.  Would appreciate it if you could file a separate bug in the Bug Reports forum for this one with sample bot code or a sim and the expected behaviour.

B2 - I'll take a look at trefbody.  Nothing there changed in 2.43z, so if it was busted in 2.43y, its still busted.

B3 - delgene was indeed fixed in 2.43z.

B4 - I don't understand what you mean here.  Which memory operation no longer works?

B5 - DB is single threaded.  I'm afraid this won't be fixed until we port the simulator to a new programming language.

Moonfisher:
Thank you.

I'll take a look at the bug report section and post something for B1, but I'm pretty sure somethings wrong here, any bot that uses refvalues to target their enemies seems to have this problem. I figured maybe the center had been moved and the bot wasn't updated, but it doesn't seem like the error in their aim has a stable offset and the aim seems to work fine in certain directions. I'll figure out the details and post a bug report.

B4 : Yeah I guess I didn't explain that very well
What I ment was :
50 .repro *.nrg 1000 sub sgn mult store
Just seems to reproduce no matter how low your energy drops.
I figured maybe somehow I was ending up with the absolute value, but it works if I only opeate on the input value :
50 *.nrg 1000 sub sgn mult .repro store

Maybe the memmory locations are unsigned now ? Or maybe you need to specify the memmory location with a number ? Other than that I have no clue... maybe I'm wrong about this, but it just seems like all the single gene bots fall appart in 2.43z ...


I hope I'm not scaring anyone off with the long list of questions, I'm not counting on anyone answering everything at once

EricL:
Store attempts always take the absolute value of the value on the top of the int stack mod 1000 and use that as the momery location (with special case code for stores to mutiples of 1000 to store to 1000).   The only store that does nothing is a store to location 0.  It has been this way for a very long time...


   




--- Quote from: Moonfisher ---Q1- I never see anyone using certain operators, so I'm wondering if they work at all. I'm refering to operators like ++ and | and ^ and such. I tryed .variable++ but that didn't seem to work, maybe it should be seperated by a space, but I'm generaly confused about this.
--- End quote ---
It should be separated by a space.  Operators such as ++ operate on the top value of the int stack.

EricL:

--- Quote from: Moonfisher ---Q2- I'm also wondering if ~= and %= works, it sais they're depercated in the description. (Also sais they're not usefull, but I disagree  )
--- End quote ---
They work.  If they don't its a bug.


--- Quote from: Moonfisher ---Q3- How does negation work ? I see examples where people use -1 mult, but from the description it would seem like this is the same as just writing - .
--- End quote ---
They should be equivalent.


--- Quote from: Moonfisher ---Q4- This brings me to my general confusion about the stack.
Q4.1#- When I write -1 mult, from what I can read I negate the value in the stack and muliply it by 1... Or would that be - 1 mult ?
--- End quote ---
-1 mult multiplies the top value int eh stack by -1.  - 1 mult negates the top value of the stack then multiplies it by 1.


--- Quote from: Moonfisher ---Q4.2#- It sais I can have 20 values in the stack at one time, but as I understand it, if I write :
a b add c d add mult
Then I only have 3 values in the stack at one time, I have a+b in one "slot" and c and d in the 2 others, when peeking (When performing the last add before mult). Or do I actualy load all 4 values into the stack before performing any operations ?
If I understand correctly then :
a b c d mult mult mult
Would load 4 values into the stack before multiplying them, whereas :
a b mult c mult d mult
Wouldn't load more than 2 values into the stack at the same time.
--- End quote ---
The last part is correct.


--- Quote from: Moonfisher ---Q4.3#- Just to verify if what I think is right :
When I write :
a b c d mult mult mult
The when I hit the first mult I take the 2 top values from the stack and add them together, these would then be c and d (since it's a stack) and the result would then be placed at the top of the stack, making the next 2 values b and c*d ... right ?
--- End quote ---
correct

Navigation

[0] Message Index

[#] Next page

Go to full version