Giter VIP home page Giter VIP logo

n-door's Introduction

n-door

n-door 选择换不换门的问题

Getting started

问题描述: n (i.e. n=3) 扇门中有一扇门后面有财宝,每扇门后面有财宝的概率是多少? 主持人让你选择一扇但不打开。 接着, 他打开任意一扇没有财 宝的门后问你, 你愿不愿意更换你的第一选择(=选择另一扇门)? 从概率的角度来看:

  • 概率1:不换门获得财宝的概率。
  • 概率2:选择换门后的获得财宝的概率。
./n_door.py

usage: n_door.py [-h] [-n N] [-t TRIALS] [-s SAVE_FILE_PATH]

optional arguments:
  -h, --help         show this help message and exit
  -n N               the number of doors (default=3)
  -t TRIALS          the number of trials (default=10000)
  -s SAVE_FILE_PATH  the path of save file (default=./n_door.hdf5)

n-door's People

Contributors

dujidan avatar

Watchers

 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.