Coder Social home page Coder Social logo

Game classification about axelrod HOT 4 OPEN

alexhroom avatar alexhroom commented on June 11, 2024
Game classification

from axelrod.

Comments (4)

marcharper avatar marcharper commented on June 11, 2024 1

@gaffney2010 worked on this for the ultimatum game, see this branch for some ideas and implementation details.

from axelrod.

drvinceknight avatar drvinceknight commented on June 11, 2024

This is all awesome @alexhroom, I think #1413 really unblocks a bunch of stuff going forwards towards 5.0.0.

  • a 'games' directory in the package, which contains a sort of 'mini-package' for a specific game. For example, the import path axelrod.games.rockpaperscissors would contain a Game, Actions and Strategy objects for rock-paper-scissors.

So this would imply moving a lot of the "current" functionality of the library to axelrod.games.ipd right?

  • Maybe for convenience, the axelrod.games directory could contain a function where a user enters a game name and it returns a dict with the various components of the game, e.g.:
>>> from axelrod.games import get_game
>>> get_game("rock_paper_scissors")
{"game": axl.AsymmetricGame([RPS MATRICES HERE]),
 "actions": [R, P, S],
 "strategies": [[RPS STRATEGIES HERE]]
}

Not sure if we need something like this (for example the strategies for axelrod.gams.ipd would be huge). It feels like get_game would be trying to do the job of good documentation. So I think πŸ€” I'd prefer us to ensure the documentation structures evolves/improves with the changes.

  • Strategies themselves should have classifications for what action set size they're for, and raise an error or warning if used on an inappropriate game size.

πŸ‘

  • If we're worried about the package getting too big with more games/strategies it may be a good idea to use namespace packages so that other games can be installed separately but used from the axelrod namespace - particularly if a few games are added before the release of 5.0.0 this would be a good way to "generalise" the library completely.

I suggest not worrying about this until it becomes a problem (but I like the suggestion of namespace packages as a solution).

from axelrod.

alexhroom avatar alexhroom commented on June 11, 2024

if we're thinking towards 5.0.0 (i.e. being willing to make breaking changes) then yeah axelrod.games.ipd would contain a lot of the specific IPD functionality. in general I was trying to point towards the idea of having Axelrod "main" be the library classes and algorithms, and then each game as a "game box" with an easy way for users to load that game into their Python session - you're right that for IPD a strategy list would get huge

from axelrod.

drvinceknight avatar drvinceknight commented on June 11, 2024

if we're thinking towards 5.0.0 (i.e. being willing to make breaking changes) then yeah axelrod.games.ipd would contain a lot of the specific IPD functionality.

Yeah I feel like we're certainly going towards 5.0.0 here with breaking changes.

from axelrod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.