AI Trading ideas
1. Estimate odds of the opponent having a certain combination of cards based on card counting of the last 2-3 rolls. (To mimic human memory/remove perfect memory)
a) If opponent can build, decline trade unless AI can build on their turn as well.
b) If opponent can not build on their turn, accept trade if it AI for future goals.
b.1) Decline trade if high probability of opponent completing their build on the next roll (e.g. 40% chance to get wood) or can attain it through bank/port trades.
c) Accept trades from opponent if 2-3 cards given to AI.
d) Decline trades if opponent is 2 more VP unless it puts AI ahead of other opponents within the turn.
e) Decline trades with opponents that have 3+ VP or in the lead.
f) Decline trade with players that have 7 VP and hidden cards.
Feel free to throw in any other suggestions or maths suggestions.
Don't build roads to locations that can't be built on unless roads contribute to continuous road along path for possible longest road.
Don't trade with someone building where the bot wants to build and/or if it cuts off the bots road. [unless that trade allows them more points/better position than the lost spot would have gained them ... ie give up a spot to avoid losing a better spot to another player]
Decide on trade based on the score of the player if they are about to take longest road/largest army (ie, will that trade give the other player 3 points or perhaps more). Don't trade away precious resources (ie, if the bot has the only brick, why is it trading it away 1:1?)
Allow counter offers when you don't have the desired resource - ie the bot wants wheat and you have 2 bricks and the bot has brick port. It's effectively 1 wheat in that trade situation.
Bot should (considering) trading a resource it needs IF it allows a the player to build and block an opponent and/or break longest road (which needs a few layers of score prediction, but seems rather algorithmic)
Keep track of trades already made in the particular turn. I shouldn't be able to trade the bot for 1:2 then turn around and trade one of those back for something else (to the same bot). IE, I've turned 1 wheat into a settlement but trading 1 wheat for 2 wood, 1 wood for 2 brick, 1 brick for 2 wool, 1 wool for 1 wheat.
The idea of AI blocking roads is definitely a neat one. It'd probably require AI recognising how likely players are going to connect their roads to other roads though.
Not sure how you'd go about scoring that (Blue players needs 3-4 roads to connect their initial settlements) + (What are the odds of them getting those particular resources).
Unless it's a case of breaking roads whenever possible. You'd then have the issue of it needing to weigh up the odds of it kingmaking but great ideas. =)
The AI will also give you 4 or 5 resources for 1 (ie I gave 1 ore and got 4 wheat, one time got 5... it's amazing)