在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):egonSchiele/dominion开源软件地址(OpenSource Url):https://github.com/egonSchiele/dominion开源编程语言(OpenSource Language):Haskell 99.8%开源软件介绍(OpenSource Introduction):DominionAn easy to use Dominion simulator! It allows you to test competing strategies and see what works best. ScreencastUsage: import Dominion
import Dominion.Strategies
main = dominion ["adit" `uses` bigMoney, "maggie" `uses` bigMoneySmithy] Or you can pass in options: players = ["adit" `uses` bigMoney, "maggie" `uses` bigMoneySmithy]
main = dominionWithOpts [Log True, Iterations 1] players StrategiesHere's a simple strategy, the "big money" strategy: bigMoney playerId = playerId `buysByPreference` [province,
gold,
duchy,
silver,
copper] The big money strategy is simple: buy the most expensive victory or treasure card you can, and repeat. bigMoneySmithy playerId = do
playerId `plays` smithy
playerId `buysByPreference` [province,
gold,
duchy,
smithy,
silver,
copper] It's just like big money, except now the player buys up smithys too. And the player plays a smithy whenever possible. So now we can compare Big Money vs Big Money + Smithy. And the results are: Out of 5000 games:
Just as a control, lets use the same strategy with both players:
So clearly, adding the smithy to big money makes a big difference! Followup actionsSome action cards have a followup action. For example, if you use throne room, you can pick another card and play it twice. Here's how that looks: throneRoom playerId = do
playerId `plays` throneRoom `with` (ThroneRoom market) And of course you can play throne room on throne room: multiThroneRoom playerId = do
playerId `plays` throneRoom `with` (ThroneRoom throneRoom) `withMulti` [ThroneRoom market,
ThroneRoom market] DocumentationSee the full documentation on Hackage. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论