Skip to content

Add a way to communicate with game engines written in other languages #31

Description

@dbravender

I do most of my game engines now in Dart since my apps are written in Dart/Flutter and it's quite a lot of work to write and debug a game engine in both Dart and Python (especially given how many games I plan on implementing) so I'd like to create a generic interface in SIMPLE that can be used to call out to a game engine over HTTP. I'm also aware of other people that would benefit from an open source stub that calls out to a remote game engine.

Here's my current rough idea for how this could be done:

  • Model definition will still be in Python.
  • Everything else will be done in a way that calls out to a server which implements the following endpoints:
    • /newgame endpoint returns {"id": "unique game identifier used by the server to map game IDs to in-memory game states", "player_count": X, "action_space_size": X, "observation_space_size": X, "player_count": X, "current_player": X, "observation": [], "legal_actions": []}
    • /step/{id} POSTed to with {"action": integer of action selected} returns the following: {"observation": [one hot encoding of current game state], "next_player": integer representing the player whose turn it is after the move is made, "reward": [array of rewards for each player], "done": true|false}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions