Comments (1)
Hello,
I'm new here, but I've been playing Dominion for about a year and keep up on DominionStrategy.com. Since I recently learned the ins and outs of CoffeeScript, I thought I could contribute to Dominate.
I was thinking about the best way to implement Embargo without being psychic like in Geronimoo's simulator. There are a few obvious ways that I can think of, the first of which would probably be easier to implement than the others:
- Add a decision to choose the card to embargo, like the decisions to trash, discardHand, etc, in basicAI.coffee. By default, the decision would choose the most expensive card not in the AI's gainPriority method. (I don't know how we could "search" gainPriority seeing that it does not return all possible priorities, given the game state.) More intricate AIs would specify a custom embargoPriority() method.
- Look at the cards that other players have bought, and embargo those. This could possibly done by looking at the size of the current stacks, such as by defining a method on State called getSmallestStack:
getSmallestStack: (omissions) ->
supplyByCount = sortNumericAssociative(@supply.slice(0)) # we'd define sortNumericAssociative similar to how sortNumeric is defined
for card of supplyByCount
return card if card.name not in omissions
getSmallestStack() would be called in embargoPriority(), and omissions would pass the value of @gainPriority:
embargoPriority: (state, my) ->
state.getSmallestStack my.gainPriority
Again, we'd somehow have to solve the problem of my.gainPriority not returning all future gains.
Thoughts?
I've forked Dominate and will start working on it as soon as I work out some kinks (see my other post).
from dominiate.
Related Issues (20)
- Implement Swindler
- Implement Minion
- Implement Mining Village
- Implement Governor HOT 1
- Implement Contraband
- Courtyard holds onto money unnecessarily HOT 1
- Command line client incompatible with CoffeeScript v1.2.0 HOT 1
- Strategies run forever and buy nothing HOT 9
- Pirate Ship bad decision bug HOT 1
- Poor Vault choices HOT 1
- Poor Mint choices
- AI spends too much time evaluating impossible actions HOT 4
- React with Secret Chamber; draw a reaction card HOT 1
- Poor Bishop choices HOT 2
- CoffeeScript Error: multiple object literal properties named "ai_playValue" HOT 3
- Throne Room and King's Court don't nest correctly HOT 1
- add "counters" metadata to each strategy as they are discovered HOT 1
- Simulator never plays Lookout HOT 1
- Minion Bug - Second Player discards hand always
- Add another optimized Big Money variant
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dominiate.