🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Chinese checkers Minimax implementation

Started by
5 comments, last by SillyCow 4 years, 2 months ago

So I work on Chinese checkers game with Minimax.

I have a problem with the evaluation function.

someone have an idea how to evaluate the moves in the game?

Advertisement

Simplest most naive function (easiest to implement): How far is each marble from a goal position.

This is the simplest one to implement. Otherwise, just google it, and you will find more complicated ones.

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

SillyCow said:

Simplest most naive function (easiest to implement): How far is each marble from a goal position.

This is the simplest one to implement. Otherwise, just google it, and you will find more complicated

so I have to hold for any soldier a goal position cell?

Benst said:

someone have an idea how to evaluate the moves in the game?

One important clarification: The heuristic function in minimax evaluates positions, not moves.

You need some heuristic function that tells you how much progress each player has made. One simple way to achieve this is to assign a number to each space on the board that indicates how far from the goal (the far vertex of the goal region) it is, add these numbers for the pieces of each player, then subtract the sums.

That should get you started. If you want a fancier evaluation function, learn more about the game and encode the knowledge, or use a neutral network trained through some form of reinforcement learning (this is not trivial).

Do you mean this game? https://en.wikipedia.org/wiki/Go_(game)

This is a very interesting video about Google Team that developed AI for this game:

8Observer8 said:

Do you mean this game? https://en.wikipedia.org/wiki/Go_(game)

This is a very interesting video about Google Team that developed AI for this game:

No.

AlphaGo is something else. Very interesting. Especailly because it's essentially an AI that also learns the rules of the game.

Ex: With the usual MinMax, your AI has all the rules of checkers programmed into it, and you just program it to play well.
Calculate a few moves ahead, and choose the best one.

With all of the “Alpha” algorithms (they also did chess, starcraft, and DOTA): They don't even teach the computer the rules of the game. They just tell it when it won or lost. The computer just gets a stream of pixels, and before it learns how to become a good player: It learns what the game is in the first place. In my mind focusing on the fact that the computer beat the human player is besides the point: The fact is, they built an AI which can learn how to play any game by itself!

That said: Developing Alphago type AI is a job for a doctorate thesis (and requires a boatload of backend hardware). This is not the path I would recommend for someone developing their first MinMax AI :-D

My Oculus Rift Game: RaiderV

My Android VR games: Time-Rider& Dozer Driver

My browser game: Vitrage - A game of stained glass

My android games : Enemies of the Crown & Killer Bees

This topic is closed to new replies.

Advertisement