I am currently at the position that I have implemented genetic algorithms into my application. Currently this consists of two genes, which effect the movement of the AI. They are responsible for causing the AI to move away from the player, move towards the player or more or hold their position, one when they have bombs to lay and one when they do not. Initial testing has been carried out upon a single one of these AIs against a simpler AI (with no GA that follows similar rules but always moves towards the player (so as to avoid a situation where both players simply flee each other)) and the following results were obtained. (initial population size 50)
As the game progressed the GA honed in on a specific characteristic, and over a couple of test runs this characteristic was the same.
As the game progressed the highest fitness increased.
Based on a sample of every 10th AI spawned, kills remained the same, but survival time was fairly erratic, however the highest (by a considerable margin, 300% increase) was after the GA had honed on to a specific set of characteristics.
From these results the following can be concluded:
Firtly it is very obvious from the erratic survival times that the reliability of the basic AI functions is not good enough, and this must first be improved so as to try to ensure that a) the AI isn't killing itself through stupid mistakes, as this removes the whole point in it learning and b) the GA are allowed to work properly as if the AI kills itself randomly on what should be a benificial trait, it will see this as a low trait as it doesnt score a high fitness. Currently it has found the same traits to be benificial, but it only has 9 possible soloutions and resultantly in the initial 50 each will appear approxmately 5 times giving it extra chances that will not exist in a more complex entity.
Secondly the fitness function is far too heavily weighted towards survival time at the moment and resultantly kills aren't increasing, even in the erratic way that survival time is. (This is somewhat to do with my not fully taking it into account when speeding it up to play an AI rather than a human player)
However to look on the positive side, the GA appears to be working correctly, as it is honing in on what appears to be a best, if unreliable, soloution. Once the AI has been made more reliable it will be possible to redo these tests to ensure everything is successful, and then some further testing on human players should be performed before an increase in complexity is made.
One other thing to note is that as the AI being played against is consistant in its tactics the ability of the algorithm to adapt has not yet been taken into account and this is one reason that human players should be tested against shortly.
Wednesday, 25 February 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment