May 24, 2012
Ok, a few bugs have been fixed and I think the implementation is now playable. If you can find a bug, please let me know. Or any other suggestions![I have a sneaking suspicion that the player decks aren’t working properly, but I’m not sure… will do some digging].
So, assuming I don’t find any more bugs, I’ll soon by able to start work on coding some AI algorithms 🙂 I’ll start with a few baseline dumb algorithms.
- random1: play actions randomly, and buy cards randomly (although I’ll tell the AI to never buy curse cards.
- random2: as above, but it will always try and buy the most expensive card it can afford.
- big money: a common, simple and effective strategy. The algorithm only buys silver, gold or provinces.
I’ll also have to write some code to save game results for future analysis. 🙂
May 23, 2012
Ok, no progress on the AI last night, but my code now supports human intelligence! (Ie, you can play against the AI. Which is useful for checking that the game has actually been implemented properly!)
Will I haven’t quite finished implementing the game rules, you can have a peak here if you like.
- the game currently doesn’t let you pass.
- related to the above, if you play a card that grants extra actions, but have action cards to play, then you’re stuck
- I need to give better feedback on what the AI is doing.
I’ll hopefully fix some of these tonight. If you spot any other bugs, please let me know. And also bear in mind that the AI is just playing randomly… it’s as likely to buy a curse card as anything else. Once I get the interface working a little smoother, I’ll start implementing some simple, and not so simple, heuristics.