Coder Social home page Coder Social logo

mus's Introduction

Mus

This project is an initial approach to figuring out the probabilities of winning at the spanish card-game Mus. The idea is to feed the code the known cards and, with a few other parameters, get the chances of winning at each of the different rounds of the game.

Why this project?

Mus is a fairly complex, imperfect information game, very typical in Spain (particularly in the north). It's my favorite card-game and the thought of writing an engine for it has been in the back of my mind for a few years now. Hopefully this is the first step towards that far-fetched goal.

In particular, a friend asked me what the odds were of a certain hand winning and, finding myself unable to give a good-enough answer, I started typing Ruby like a madman.

About the game

Briefly, it's a four-player game played in pairs. It consists of four rounds: grande (big), chica (small), pares (pairs) and juego (game). Grande is about who has the highest hand; chica is about how has the smallest; pares is about who has the best pairs, and juego is about whose cards add up to the highest number. Each of them has different punctuation methods. The point is to bluff your way through and try to win hands you should't win.

Betting occurs in all rounds; stones are taken from the pot until one of the teams reaches 40 (or 30) and wins.

For a more in-depth explanation please refer to the wikipedia page.

Running the code

  1. Download the code
git clone https://github.com/tempate/Mus
  1. Edit the conf.json file to match the game-setting to evaluate.

  2. You're ready to go! Run:

ruby main.rb -c conf.json

mus's People

Contributors

tempate avatar

Watchers

James Cloos avatar  avatar

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.