Giter Club home page Giter Club logo

montecarlo's Introduction

MonteCarlo

MonteCarlo is a little application I had to develop in C# during my studies, in order to learn parallelism in .NET Framework. I decided to re-code this in Ruby, in order to practice.

Purpose

The purpose of this application is to simulate a casino game, in order to tell it if it would be profitable.

Rules

There are 3 Players, the bank and 2 players. The bank draws 3 cards, the players each draw 2 cards in a 52 cards made game.

  • The scores are calculated by adding every player cards' value, (exemple: player1 has got a 2 diamond and a 6 spade, his score is 8)
  • If a player has 2 cards with the same color, his score is increased by 20.
  • If the bank has 3 cards with the same color, her score is increased by 35.
  • If the bank has 3 cards with the same value (ex: valet, valet and valet), she wins the game.

Simulation

The simulation is made with a million iterations made loop, in order to get an approach with Monte Carlo method. The more iterations are there, the more precise is the simulation and the bank's win rate probability.

montecarlo's People

Contributors

valentindruon 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.