Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nickelplate

Advice needed in relation of writing a board game.

This topic is 5403 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings all, I''m writing a simple board game to try out some AI techniques I read about recently. I''m not sure about how I should store the information regarding the allowed moves for the player. Is it better to compute all the possible moves for all the pieces in the game at each turn, or see if a move is possible only when the player tries that move? I''m asking better not in terms of performance, but in terms of overall advantages. The moves aren,t complex to compute at all. Cheers.

Share this post


Link to post
Share on other sites
Advertisement
It somewhat depends on the game, but not really. The truth is even tic tac toe you can't really store all possible moves, there's just too many. Chess or checkers or go? forget it. Typically these games have a move generator that for a given position determines all the possible moves at that moment. Then each turn you build a game tree with it.

There is a ton of info on this on the net, it's a very active and popular topic. Google should be very fruitful. It's almost all geared towards Chess, but the general concepts (alpha-beta pruning, game trees, move generators, bitboards, etc) are universal across most games. It's fun stuff.

[edited by - tortoise on September 3, 2003 9:07:51 PM]

Share this post


Link to post
Share on other sites
Thanks for your input, you indirectly answered my question. I knew about the info you were talking about, it''s just that I misinterpreted the problem.

Cheers.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!