AI for monopoly game?
How should I approach this? ;\
Coding Samples :: Tips :: Discussions :: Game Directory => Game Makers Forums
Online RPG Creator
Do you expect replies to have the same amount of effort put in them than you have in your question? You know, they might end up rather short.
In general, it helps if you spend at least a bit of time to describe your problem. Answering to What have you tried? already in the first post is very important.
If you haven't written anything for the AI yet, give us at least your best attempt or an idea. Or, if that also is difficult, then start by circling around the difficult part (AI) as well as possible, and write about the systems you have in place that possibly relate to solving this problem. There are lots of Monopoly games out there with different features. What kind of features do you have in yours? You can't expect anyone to give you focused advice if they don't even know what actions the player has to choose between in your game. You might even notice that after writing that down, you'll get a good idea of making an automated player that decides between those actions.
Monopoly is largely governed by random outcomes of the dice roll, so it doesn't matter that much what you do with the AI, pretty much anything looks "decent". Here's one:
1) When it is the AI player's turn, enumerate all possible actions the AI can make. Those could be:
- buy property if this square free
- buy house if I own this square
- mortgage property
- offer to trade property
- do nothing
2) Choose the actions to do from the above list:
- If I've got plenty of money (money >= fixed threshold), always buy property if possible, or buy a house.
- If I've got the least properties and no money, mortgage properties to buy the property.
- If another player owns properties that hold me from completing a set, ask to trade with 50% probability if haven't asked so during the past N turns.
It's not that much more involved. A simple decision tree will suffice for creating a good enough AI. If you want to, you can put in different thresholds for auctioning and buying choices to alter the strategy that the AI applies.
Hope that helps,
In general, it helps if you spend at least a bit of time to describe your problem. Answering to What have you tried? already in the first post is very important.
If you haven't written anything for the AI yet, give us at least your best attempt or an idea. Or, if that also is difficult, then start by circling around the difficult part (AI) as well as possible, and write about the systems you have in place that possibly relate to solving this problem. There are lots of Monopoly games out there with different features. What kind of features do you have in yours? You can't expect anyone to give you focused advice if they don't even know what actions the player has to choose between in your game. You might even notice that after writing that down, you'll get a good idea of making an automated player that decides between those actions.
Monopoly is largely governed by random outcomes of the dice roll, so it doesn't matter that much what you do with the AI, pretty much anything looks "decent". Here's one:
1) When it is the AI player's turn, enumerate all possible actions the AI can make. Those could be:
- buy property if this square free
- buy house if I own this square
- mortgage property
- offer to trade property
- do nothing
2) Choose the actions to do from the above list:
- If I've got plenty of money (money >= fixed threshold), always buy property if possible, or buy a house.
- If I've got the least properties and no money, mortgage properties to buy the property.
- If another player owns properties that hold me from completing a set, ask to trade with 50% probability if haven't asked so during the past N turns.
It's not that much more involved. A simple decision tree will suffice for creating a good enough AI. If you want to, you can put in different thresholds for auctioning and buying choices to alter the strategy that the AI applies.
Hope that helps,
If you want to make a competitive Monopoly bot, I have an idea that might help. Write a fast "board" class (something that contains the whole state of the game and can tell you if the game is over, whose turn it is, what choices are available and can also compute the consequence of a choice), and then use Monte Carlo methods, like what people have been using recently in computer go with much success. Look for Monte Carlo Tree Search (MCTS) for more information.
This method is one of the few I am aware of that has a chance at working well in games with several players and randomness. Hidden information is harder to handle, but it's also possible and I don't think Monopoly has any (I haven't played in too long).
This method is one of the few I am aware of that has a chance at working well in games with several players and randomness. Hidden information is harder to handle, but it's also possible and I don't think Monopoly has any (I haven't played in too long).
No, there really is no hidden information. That being said, you can use Markov models and maximization of expected utility applied to what has been posted above.
Remember, in constructing game AI, you need to simply drop yourself into the situation (not hard to do in Monopoly) and ask "what do I consider important for making a decision" and "given certain circumstances, what would I do?"
Remember, in constructing game AI, you need to simply drop yourself into the situation (not hard to do in Monopoly) and ask "what do I consider important for making a decision" and "given certain circumstances, what would I do?"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement