Our games > Cartographers

Cartographers simulation v0

**Carl**:

I created a small script to simulate Cartographers games using a greedy algorithm. Currently, it only scores the game once, at the end of the game, and it does not take into account points for Coins (either from mountains or pieces). There are also no monsters.

https://imgur.com/a/sEg4rYW

I'm 'cheating' a little bit here, because I'm taking the best of 10 plays for a particular set of cards. However, there is no learning going across games (i.e. the simulator doesn't make use of what cards will come up later in the game).

Hopefully if I keep going there will be more interesting updates later. :)

**Jimmy V.**:

Great!

By greedy algorithm, do you mean your bot picks a random move among the ones that maximise short-term scoring?

Also your screenshots donâ€™t say what edicts are played. So it is a bit puzzling.

**Carl**:

Updated descriptions. It picks the best move that maximizes 'long-term score', based on all the edicts coming up to score (but not taking into account when they are scored). In this case, since all edicts are scored at the end, the scoring function is simply the sum of all edict scores used.

Of course it has the obvious drawback that edicts that require 'planning', e.g. Wildholds, Borderlands, are probably not played anywhere close to optimally. The edicts which rely on short-term score and are not severely constrained (e.g. Canal Lake) are probably played pretty the best.

Given that it seems to lead to reasonable play, my idea is that it would be possible to feed these games into a policy network to create a deep (or shallow) learning engine which should play significantly better. But I'm not exactly sure how to do it so not committed yet :)

**Carl**:

I now have a working simulation of the whole game with most rules incorporated, and most score cards from base game and heroes.

https://imgur.com/a/SjkT58p - shows the same draw of cards with and without monsters, with the same score cards and a greedy vs greedy + tweaks algorithm (some minor tweaks to make progress toward Borderlands/Wildholds in greedy strategy).

I'm showing the best of 10 plays for each layout with that strategy.

* Greedy, no monsters 116p (avg 106, std 6.7)

* Greedy w tweaks, no monsters 153p (avg 135, std 7.7)

* Greedy, 2 monsters 97p (avg 91, std 4.7)

* Greedy w tweaks, 2 monsters 122p (avg 107, std 7.3)

**Lieven D.**:

I'm interested in making my own simulation, but I got stuck at how to program counting of points in for example greengold plains.

I know you get 3 points for each village cluster adjacent to at least three other terrain types, but where do you start (and stop) counting,

seems not very obvious how to program this :(

Do you have any hints on how I could tackle this problem?

Navigation

[0] Message Index

[#] Next page

Go to full version