Code Monkey home page Code Monkey logo

rockpaperscissors's Introduction

This is a personal machine learning Rock Paper Scissors Game.

There are Three Modes:
-Easy: Computer Chooses Rock, Paper or Scissors at Random
-Impossible!: Computer chooses throw that will beat yours
-Hard: Computer Predicts what you will throw based on the patterns of others

Future Improvements:
-Connection Hard.txt to a server to update as more people play
-Tracking individual player patterns as well as patterns of all players

The Code:
-The code is very sloppy and not DRY at all (This was started before I was taught python conventions)
-Hard mode predicts based on the last round
  -It looks what most players throw next considering the player's last move and the result
  -i.e. what do most players do if they just lost to rock
-Again, I apologize for the terrible code. I hope to edit this in the future so it isn't so terrible

Hard.txt explanation:
-The first digit after "move:" represents the players last throw (1-rock, 2-paper, 3-scissors)
-The second digit after "move:" represents the computers last throw (1-rock, 2-paper, 3-scissors)
-The "r,p,s" lines represent the number of times players have thrown each option

rockpaperscissors's People

Stargazers

 avatar Xiaolei Yu avatar Wei Lyu avatar

Watchers

James Cloos avatar Josiah Smith avatar

Forkers

dawncc

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.