Sign in to follow this  
Butch

Game made with an HTML5 P-code. Roulette Markov

Recommended Posts

 There is a roulette game at http://www.html5pcode.com/a1yroulette.htm The p-code was written in HTML5 JavaScript.

The home page is http://html5pcode.com

You can adjust the frequency table for all of the 38 possibilities. You can test the the result of your changes.

It will build a Markov Transition Matrix for Stop at Loss, Stop at Win, and Stop at a number of spins.

jpgroulette.jpg.c90efc920da55facab9562aa9b374223.jpg

The expected value of the game will be given by the Markov Chain.

 

Share this post


Link to post
Share on other sites

A P-code is similar to a programming language, except it contains only the instruction you want to perform particular tasks. In this case it is to build games that use mathematics. So the P-code Engine contains JavaScript functions that perform these tasks. It also contains the JavaScript programs that facilitate the building of P-code programs.  There are functions for displaying patterns, showing pictures, animation, probability, and many more. New functions are added , when new capabilities are needed.. The name of the JavaScript file is a001.js. You can view this file by asking the browser to view the HTML page. Then click on the a001.js file to view it.,  You are free to copy any of these functions. I have been programming for over 45 years, so I have no problem understanding my JavaScript P-code Engine, but I can understand that others may find it difficult to follow. It was originally written in Java. There are many YouTube videos that explain the use of this P-code Engine. To see them go to html5pcode.com. As to the colors I used, I'm a mathematician and not an artist. Sorry; I will try to do better.   

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.