I've been hacking at the AR Minecraft thing a lot recently, finally adding lighting and some better drawing code to speed things up a little. Its doing my head in so as a break I've been working on something that I've wanted to do for a while: Genetic Algorithms :D
I grabbed the pyGene libraries and hacked a few examples to do something useless, in this case it generates Cocktails from a list of ingredients :)
For example:
Drink title = akjlbmallikcjfieefjlmcaedgikbiijmcgefmba,0
12.5ml of rum
12.5ml of Lemon juice
50ml of pineapple juice
Blend rum, Lemon juice, with ice
then
top up with pineapple juice
the long strings are the genomes for each drink, I dont have a genome->name generator (yet.. got an idea for it though). The genes are read in an awkward way but produce the same output for a given input.
The basic flow goes: Generate 10 randome genomes, most of them will be disgusting drinks but for each one a relative rating is made by the drinker. These are fed back into the software as the fitness levels and the genomes are bred together to produce better cocktails :D
I've tested this by rating up cocktails that have lemon in them, sure enough by the 5th or 6th generation I was looking at a whole load of lemon-based cocktails
Next plan is to test this IRL :D
to A break from AR/Minecraft
Feed for this Entry0 Comments
There are currently no comments.