GithubHelp home page GithubHelp logo

space-mining-poker's Introduction

Space Mining Poker

Rules

The game is played with N players. Each player has M money and T tech. The M attribute is public, the T attribute is private. Each player starts with M=1000 and T=0.

A game has many repeated rounds, over which each player tries to maximise their bankroll M. Each round of the game has various phases, as follows.

0) Discovery phase:

In this phase, the asteroid is found and analysed. The game assigns a fixed reward P0 (from some distribution DP) and an unknown reward Pu (same distribution).

1) Business phase:

In this phase, each player has to buy 1 random tech (drawn from some distribution DT) at a fixed price of 10. Players who go bankrupt are removed from the game.

2) Auction phase:

In this phase, an auction is held for an unknown tech, which will be drawn from DT.

The rules of the auction are as follows. Each player submits a bid (blind of the others) for the new tech. The highest bidder is awarded the tech (adding to their total) and their bid is subtracted from their bankroll. In the case of a tie, the bid is awarded to both tied bids (both players buy the tech at that price). The tech awarded, the winning player and the winning bid are all announced at the point of the award.

Repeated auctions are held until one or more players announce that they will launch.

3) Mission phase:

This phase corresponds to the launch of a mission to mine the asteroid. Once a player announces a launch, the race is on. Each player has the option to either compete in the launch or to sit it out. A player who sits out the launch preserves their tech total T for the next round and takes no further part in this round. A player who joins the launch has a chance of mining the asteroid. Launching players spend all their tech on the launch. A winner is chosen for the round at random, where the Probability of a win for each player is

p(player n wins) = Tn / (sum(Ti) + F).

F plays the role of allowing the possibility of no winner where the asteroid is not successfully mined. F can be modelled to reduce over repeated games.

The payoff to the winning player for mining the asteroid is

payoff = P0 + Pu + Pt. This is all made public information at this point.

Pt is an extraction efficiency reward which depends on the average tech spent by all players over past 10 rounds.

How to play

At the moment, it is required to modify the player names and strategies in the players_rc.py file. Network players use their network name/IP address and port as a string instead of a strategy, and will need to separately run strategy_server.py with the port to use (or an offset to the base port 49000) as the command line argument on their machine. Network players can set their strategy by editing strategy_server.py accordingly.

Possible extensions:

  • Borrowing money at interest (payable per turn).
  • Limit number of bidding rounds but reveal more information about asteroid in each round (similar to flop & river in poker).

space-mining-poker's People

Contributors

abgandar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

abgandar

space-mining-poker's Issues

Logging, stats and record keeping

We need to record (in a nice, machine readable format, perhaps json) the public and private data at each turn, for statistical analysis and bot design.

Main program should read rc file for players, constants etc

Main program should read rc or ini file for players, rather than have them hard-coded.

Pretty easy to implement with ConfigObj / ConfigParser. Possible format could be something like:

[constants]
initial_bankroll = 1000
initial_tech = 0
base_price = 5
base_tech = 11
bid_tech = 11
failure = 0.1
failure_attenuation = 0.98

[players]

[[player1]]
name = Ati
type = Terminal

[[player2]]
type = Network
name = Alex
location = location:49000

[[player3]]
type = SpongeBob
name = SpongeBob

Alternative formats could be json or a simple import of a python file.

Network play

Impelement a network server/client model so that humans and bots can play from different computers without leaking information to other players.

Potential rule changes

Just some additional ideas about rules:

  • Restrict auction round to maximum number of auctions (e.g. 3)
  • after each auction round more information could be revealed about asteroid, modelling growing knowledge about the asteroid through better observations pre-mission. Could be additional random rewards drawn (similar to flop&river in Poker).

public_information should include more information

public_information should include information about current players, perhaps as:

public_information['players'] = {
    'player1': {'bankroll': 1030},
    'player2': {'bankroll': 955},
    'player3': {'bankroll': 324}
    }

It should be a complete representation of the public parts of the game state.

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.