gaigresearch / tabletopgames Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
They don't actually have any functionality or anything (other than the main method to run the game). We could remove main game classes, make AbstractGame class not abstract and just use that directly to initialise games (with the specific parameters, game states and forward models).
Cards shouldn't have logic attached, only containers for properties.
In the game state the game runs with, we need full observability (GUI display etc).
For players, decks should be altered so that the players see what they need to see only when the game state is copied.
So this class might not be needed?
The game state implementations of copy(int playerId) should return a copy where only the components visible by the player are included.
Games to do:
Games to check/do:
I thought it was used, but unsure and needs double checking.
If we define interfaces for components (i.e. IDeck -> Deck), then GameState should have collections of interfaces (List instead of List). This is done for decks, but we probably wanted to do the same for the other components.
Also, this creates many errors (fixed with castings) in the pandemic classes.
If this function is called accidentally after the game has finished and the results are set, it will keep iterating through players looking for someone still playing (when there's nobody).
See PandemicForwardModel (L: 193)
The deck has been templated, but a lot of methods keep names of "cards" in them, that should be updated.
Also, this should probably be restricted to Components and not just any object type to make sense in the context of the framework.
I'm not sure why there are many actions in game packages that use a templated version for the decks, when they know the types of objects going in (cards most of the time) and even name variables as such. Related to issue #63
All game parameters classes should make a proper copy of themselves (so that agents don't ever get the actual objects to mess up the games).
To do:
The games being implemented sometimes use different systems and duplicate information in various places. I've started cleaning some of it up, but this is going to continue causing merge issues. Should be doing a hard stop on development and do a thorough clean-up across all games, to make sure we extract as much general logic as possible out of the specific implementations and simplify implementations of future games - as well as keeping all of this consistent, modular and well documented.
Further things to consider:
Currently can't do switch statements with the game phase anymore. Any better way to extend the game phases available?
There are still some differences in how games are implemented / using constructors or setup methods. Proposed:
Also, we should start writing proper documentation on using the framework with step-by-step for setting up a new game, game state, forward model, actions, GUI etc.
Something still missing is for an easier way for games implemented to remember all the things they need to add in FM.next() method to make a game work, i.e.:
We should either add more abstract functions in the FM to remind of this, or more easily add all of this information in documentation (both in code & in wiki).
toString() methods in actions often need context if they don't have objects as references. Adding a game state object would allow for retrieval of said objects so that printed messages are informative again.
Alternatively, more primitive parameters can be added to actions according to their print needs (i.e. deck names, current player etc.), but these would be more troublesome and cluttering.
Actions moved to Pandemic, package separated from core
MovePlayer action has too many checks, which make it very specific
There are actions in games packages that are general (or could be made so) and should be moved to the general actions package.
For example, there is no need to have a DrawCard action for each game, when they do the same thing. Check for a lot of code duplication.
Default view for all Components, provided from the engine based on contents in the game state provided + raw list of actions, for testing.
Reading a paper on this, and considering this as a future development.
We could additionally provide the option to get from the game state a list of action "shells", i.e. all the action types available with no variables assigned (if there are more than 1 option for variables in an action). Then, each action shell would provide:
Example: a "Move token" action would provide:
This could allow more granular/hierarchical planning.
The game state implementations of getScore(int playerId) should return a numerical value of the game state (the bigger the better).
Games to do:
Maybe use lowercase conversion for hashing? it would be less confusing to work with. Tried to get researchStations, but did not know how it was written
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.