Original Post
I'm just curious that has anybody used genetic programming for Game AI before? I mean I'm doing my project and I just need some experience.
Quote:
Original post by Steadtler
I will count to 3, and you will snap out of it and realize that a GA is just a sugar-coated gradient descent.
1
2
3...
Quote:
Original post by InnocuousFox
Notice he said "genetic programming" rather than "genetic algorithm". One modifies data, the other modifies the code itself.
Quote:
Original post by InnocuousFox
Notice he said "genetic programming" rather than "genetic algorithm". One modifies data, the other modifies the code itself.
Quote:
Original post by Alvaro
where computing the partial derivatives of the fitness function is impossible and where the only thing you can even try to measure is the relative fitness of a setting of the parameters with respect to another setting of the parameters
Quote:
Original post by Steadtler Quote:
Original post by Alvaro
where computing the partial derivatives of the fitness function is impossible and where the only thing you can even try to measure is the relative fitness of a setting of the parameters with respect to another setting of the parameters
Doesnt that sound like a finite difference? :)
Quote:
Original post by alvaro Quote:
Original post by Steadtler Quote:
Original post by Alvaro
where computing the partial derivatives of the fitness function is impossible and where the only thing you can even try to measure is the relative fitness of a setting of the parameters with respect to another setting of the parameters
Doesnt that sound like a finite difference? :)
Actually, no. Imagine you are trying to optimize the strength of a poker bot. The only measure of strength you have is matching one bot against another for a number of hands and seeing who makes money off of whom. I don't see what a finite difference have to do with anything.
Quote:
Original post by Steadtler
In its most basic form, a GA takes a point, find points in the neighborhood ("mutation"), then compare those points and keep the best(s) according to some test ("fitness"/"selection"). Like I said, a sugar-coated gradient descent. The more they deviate from this formula and the more they look (and perform!) like a random search.
Quote:
Original post by Kylotan
Firstly, you missed crossover - without that, it's not a GA.
Quote:
Original post by noppanit
I'm just curious that has anybody used genetic programming for Game AI before? I mean I'm doing my project and I just need some experience.
Quote:
"Genetic programming (GP) is an automated method for creating a working computer program from a high-level problem statement of a problem. Genetic programming starts from a high-level statement of “what needs to be done” and automatically creates a computer program to solve the problem."
Quote:
Original post by willh Quote:
Original post by Kylotan
Firstly, you missed crossover - without that, it's not a GA.
Crossover is just another form of mutation.
Quote:
Original post by Kylotan
No, it's not.
Crossover and mutation both change the solutions to explore the search space but they are completely distinct in their purpose, which is why you can't leave one out and talk as if you're still using a GA, any more than you could leave out a heuristic and claim you're still using A*.
Mutation alters part of a candidate solution in arbitrary ways, without any reference to other members of the population. It is there for overcoming local extrema and to improve the current value in gradual or limited ways. It adds new information into the population and is necessary for exploration and exploitation of the fitness space.
Crossover generates no new information as such, but replaces part of the current solution with a corresponding part from another member of the algorithm's population. That member of the population is chosen using some routine that favours members with higher fitnesses. Therefore the parts of the solutions that are better persist unchanged into future generations. This is critical as it speeds up convergence, which is its primary purpose - it takes 2 solutions which have often optimised different dimensions of the problem and combines them into 1 solution. Mutation alone cannot do this.
Genetic algorithms require crossover, mutation, and selection. Without implementing crossover properly you've pretty much crippled selection too and all you're left with is a mostly random form of beam search, which of course is going to be worse than pretty much any other algorithm you might throw at it. If that is how people use GAs then it is not at all surprising that they get poor results.
Quote:
Original post by Kylotan Quote:
Original post by willh Quote:
Original post by Kylotan
Firstly, you missed crossover - without that, it's not a GA.
Crossover is just another form of mutation.
No, it's not.
Crossover and mutation both change the solutions to explore the search space but they are completely distinct in their purpose, which is why you can't leave one out and talk as if you're still using a GA, any more than you could leave out a heuristic and claim you're still using A*.
Mutation alters part of a candidate solution in arbitrary ways, without any reference to other members of the population. It is there for overcoming local extrema and to improve the current value in gradual or limited ways. It adds new information into the population and is necessary for exploration and exploitation of the fitness space.
Crossover generates no new information as such, but replaces part of the current solution with a corresponding part from another member of the algorithm's population. That member of the population is chosen using some routine that favours members with higher fitnesses. Therefore the parts of the solutions that are better persist unchanged into future generations. This is critical as it speeds up convergence, which is its primary purpose - it takes 2 solutions which have often optimised different dimensions of the problem and combines them into 1 solution. Mutation alone cannot do this.
Genetic algorithms require crossover, mutation, and selection. Without implementing crossover properly you've pretty much crippled selection too and all you're left with is a mostly random form of beam search, which of course is going to be worse than pretty much any other algorithm you might throw at it. If that is how people use GAs then it is not at all surprising that they get poor results.
Quote:
Original post by alvaro
Actually, no. Imagine you are trying to optimize the strength of a poker bot. The only measure of strength you have is matching one bot against another for a number of hands and seeing who makes money off of whom. I don't see what a finite difference have to do with anything.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more