Jump to content

Is it cheating to 'tweak' a genetic algorithm?


Recommended Posts

I've been having fun playing around with very basic genetic programming. The simplest example is just trying to get from point A to point B across a bounded 2D space, as shown at http://ken.coar.org/images/basic-ga.png (the = in the left edge to the = in the right edge). In the example, the fitness value is based on the Euclidean distance between the target and the position of the last expressed gene.

 

Since I have a broader perspective than the program, I can see places where tweaks might be possible. For example:

  • assessing a slight penalty for each allele that, without cause (such as avoiding an obstacle), increases the Euclidean distance to the target over that of the preceding gene. I.e., an allele that needlessly moves away from the target decreases the chromosome's fitness value;
  • applying 'peephole' optimisations by splicing out pointless diversions (like oxbows in a river) and adding genes to the tail equal to the number of those excised;
  • and so on.

My question is whether this sort of intervention is, essentially, cheating -- by making the program 'test-conscious,' as it were.

Edited by THX-1138
Link to post
Share on other sites

I look at it as a form of artificial selection.

 

The algorithm gains the benefit of knowledge but also the drawback of assumption of knowledge. Will almost certainly arrive at a solution faster, but it may not arrive at the most optimal solution as you've restricted the problem space.

 

Been a bit since I worked with alife. Did have fun though.

Link to post
Share on other sites

2 Things, when you say "peephole" are you alluding to the p != np problem? By giving the algorithm access to the data?

 

Secondly theres a whole list of generic algorithms for path finding, as you mentioned heuristic mathematics is the basis.

 

If the answer to the first is "yes" then the answer to your question is "yes", if by any other means your modifying the algorithm, such as giving it access to its own learned data, then the answer is "no" its not cheating, that is the basis for machine learning.

Link to post
Share on other sites

I don't know what the 'p != np' problem is at the moment, so I can't answer that.

 

But the rest of your response answers my question, I think.

 

Thanks!!

Link to post
Share on other sites
  • 4 weeks later...

I don't know what the 'p != np' problem is at the moment, so I can't answer that.

 

But the rest of your response answers my question, I think.

 

Thanks!!

 

p != np is a heuristic problem regarding the fastest path to a location when the intermediate steps are not known.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.