Sign in to follow this  
RJSkywalker

Evaluation Function in AB Pruning

Recommended Posts

Hey guys...i m working on a 2-player car racing game through a maze. I'm more focused on the AI part rather than the graphics. To solve the AI I'm using the AB pruning which so far hasn't given me
any problems. However I was wondering what could be the best evaluation function that could be used in a 2-player game involving a maze with the players being able to put obstacles in their opponent's path.
At the moment, I was just thinking about a simple heuristic involving the distance between the players and distance between the finish point and the current position of the player.
Can u guys suggest some commonly used evaluation functions?

Share this post


Link to post
Share on other sites
A turn-based car racing game? I've never written an evaluation function for that type of game, but writing evaluation functions is typically an iterative process. You start with something very simple, you find situations where it doesn't play well, try to understand why and then try to modify the evaluation function (or the search) to improve the playing strength in those situations.

Share this post


Link to post
Share on other sites
by 2-player car game, I meant..there is a maze and the 2 players have to reach the finishing point. The one to reach the finishing point first wins. In addition the players can put obstacles in their opponent's path like sand or oil slick or any other obstacles...Anyways I'll check out what evaluation function can work best..

Share this post


Link to post
Share on other sites
Beware dilettante at work! ;)

It could very well be that my post won't make ANY sense because i have only a faint idea how ab-pruning/minimaxing works and i'm not quite sure i understand what you want, but anyways:
Why don't you use a* to get the best path available and do your ab pruning from that. I'd think getting nearer to the finish line would be pretty much the most important thing. The further you get from the best path the higher the penalty/cost, so if you can steer just a bit to do something it's better than if you have to steer far. Also you could use a* to evaluate the usefullness if you throw an obstacle with the tile with sand/oil etc having a greater cost to traverse it now.

Share this post


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

Sign in to follow this