One form of copy/paste bug

Report Bugs.

One form of copy/paste bug

Postby Lotharsson » Sun Mar 13, 2011 2:04 am

This should be easy to fix, assuming I've identified it correctly, but it won't solve the cross-platform issues.

I have a car running in a source simulation that defines 3+ wheels in its chromosome, but specifies wheel count = 2. When I copy that car to a new simulation where (before I press "input seed car") I specify "max wheels = 3", the simulation appears to override the seed car's wheel count by setting it to the simulation's max wheels setting. A wheel appears on the car in the target simulation that did not exist in the source simulation - and frequently means that the source and target simulations show very different results. The seed car's wheel count should not be modified by the target simulation in this scenario.
Lotharsson
 
Posts: 255
Joined: Wed Mar 02, 2011 2:44 am

Re: One form of copy/paste bug

Postby samadam » Wed Mar 16, 2011 5:36 am

Isn't the max wheels setting stored in the chromosome string? And if you want that new wheel to not appear, just set all the unused wheels to position -1.
samadam
 
Posts: 16
Joined: Fri Mar 04, 2011 5:25 pm

Re: One form of copy/paste bug

Postby Lotharsson » Wed Mar 16, 2011 6:32 am

Isn't the max wheels setting stored in the chromosome string?


No. The max wheels setting is a property of the simulation. You set it in the edit box down just below the score. It is supposed to specify the maximum number of wheels to allow on any random cars required to fill out the population if the number given by the input seed is insufficient.

The wheel count for a particular car is stored in the chromosome string. That is the number of wheel definitions within the car's chromosome to treat as valid (although some may specify wheel number "-1" to indicate "no wheel defined in this definition slot" as you point out).

The problem here is that the chromosome's wheel count seems to be over-ridden by the simulation's max wheel setting - at least in some cases - which changes the number of wheels on the car(s) used as input seed, thus making them different cars with different scores, hence it is a copy/paste bug.
Lotharsson
 
Posts: 255
Joined: Wed Mar 02, 2011 2:44 am

Re: One form of copy/paste bug

Postby Lotharsson » Wed Mar 16, 2011 6:34 am

samadam wrote:And if you want that new wheel to not appear, just set all the unused wheels to position -1.


This will work, but users should not have to do this in the designer for every car they wish to copy/paste to ensure that they work correctly after paste into a new simulation. That's really one purpose of the car's "wheel count" value in the chromosome.
Lotharsson
 
Posts: 255
Joined: Wed Mar 02, 2011 2:44 am

Re: One form of copy/paste bug

Postby samadam » Thu Mar 17, 2011 3:37 pm

Lotharsson wrote:
samadam wrote:And if you want that new wheel to not appear, just set all the unused wheels to position -1.


This will work, but users should not have to do this in the designer for every car they wish to copy/paste to ensure that they work correctly after paste into a new simulation. That's really one purpose of the car's "wheel count" value in the chromosome.

A solution would be to have a car evolved with x wheels have 8-x wheels set to -1 when generated by the software. This loses a bit of vestigiality in the genome, but should work fine.
samadam
 
Posts: 16
Joined: Fri Mar 04, 2011 5:25 pm

Re: One form of copy/paste bug

Postby Lotharsson » Fri Mar 18, 2011 12:44 am

samadam wrote:A solution would be to have a car evolved with x wheels have 8-x wheels set to -1 when generated by the software. This loses a bit of vestigiality in the genome, but should work fine.


If you went down that path then you'd have to make the designer do the same...
Lotharsson
 
Posts: 255
Joined: Wed Mar 02, 2011 2:44 am

Re: One form of copy/paste bug

Postby Ryan » Wed Mar 23, 2011 2:10 pm

Currently it uses the last input cars maximum wheel number to set the new simulation. There can't be cars with different numbers of max wheels in one population because it makes different sized chromosomes and the algorithms break.

I could set all the useless parts of each chromosome to 0 or -1 but i kinda liked the idea of junk 'dna' being in there that may be turned on in another simulation.
Ryan
Site Admin
 
Posts: 104
Joined: Tue Mar 01, 2011 6:51 am

Re: One form of copy/paste bug

Postby Lotharsson » Wed Mar 23, 2011 2:20 pm

Ryan wrote:Currently it uses the last input cars maximum wheel number to set the new simulation.


This wasn't what happened to me. I specified 3 for the simulation, pasted a single car that specified max wheels = 2 ... and got 3 wheels in the car and simulation. I recall repeating it a couple of times to check.

I do believe I've also seen the behaviour you specify as well though, which is mystifying.
Lotharsson
 
Posts: 255
Joined: Wed Mar 02, 2011 2:44 am


Return to Bugs

Who is online

Users browsing this forum: No registered users and 0 guests