I am programming a game where there are 4 competitors (players) who have finished goods that they can then sell to given markets for which they have (at most a single) contracts for. Any finished goods is for a given market.
Turn order is important in the game as this will decide who sells first.
Turn order: Player #A, #C, #D, #B
The problem I'm having is I have no idea how to make the AI players aware of the following factors; they seem to need to know a lot of things which may impact on where to sell first.
For example, AI needs to know.
- Am I the only person who can sell to a given market? If so, that's fine -- sell all goods to market.
If not, do the following
Who are my competitors for a given market and will I be able to sell first?
If I sell in Market A, will I still get a chance to sell to Market B when turn order returns to me? (demand for items goes down for every sale and can bottom out)
Indeed, this is one strategy I'm wanting to employ -- sell to a given market because i he does not he might not get a chance to sell again when turn order returns to them.
- If I sell, should the AI go for most revenue per selling round.
Currently I am looking to order all markets for a given player based upon selling ability (who can sell first)
Basically an array of people who can sell for a given market based on player order.
These people then sell, and we reduce the array by one and repeat the process.
Whilst this solves some problems, it does not solve the bigger problem, which is the AI will just end up selling stuff in the order that of the Markets array; and not specifically to the ones where it is either advatangeous to do so, or will generate them the most money.
I am wondering, how do you design an AI to make coheriant, logical decisions about what when and why they would sell to a given market?
Sorry for the wall of text.