项目作者: tristaaan

项目描述 :
Generate Settlers of Catan maps with constraint programming
高级语言: Python
项目地址: git://github.com/tristaaan/OptimalCatan.git
创建时间: 2019-06-16T16:58:08Z
项目社区:https://github.com/tristaaan/OptimalCatan

开源协议:

下载


Optimal Catan

Generate an ‘optimal’ Settlers of Catan board where:

  • No two of the same resources are adjacent.
  • Lumber and brick are not adjacent (take that road builders!)
  • None of the same numbers are on the same resource
  • 6’s and 8’s aren’t adjacent and all on separate resources.
  • None of the same numbered markers are adjacent.

example board

Written with MiniZinc 2.2.1. There are two models, one generates the board layout and the other generates the markers for the board. They can be generated all at once:

  1. $ ./gen_island.sh $(( ( RANDOM % 10000 ) + 1 ))

Where or you can provide your own random seed, otherwise the island will always be based on the first solution the models find.

Read more