Website link: https://nashcalcwebappfour.herokuapp.com/
I've been working on a little hobby project that is a poker calculator github code. It handles specific situations tournament players often get into when they only have a certain amount of chips left. The calculations for the solutions are fairly complex and so they take 10-30 secs to computer. I didn't code this aspect, however, instead I have an approach which is the reason I wanted to make this project (other than giving me and excuse to learn further learn how to program). Basically the idea is to store sets of precomputing solutions so rather than having the compute the solutions for a given set of inputs the code just searches the precomputed solutions and matches the correct answers to the given inputs.
There is an obvious disadvantage here that seemed interesting and I wanted to explore (at least for my own clarification). It is quite obvious that precompiling solutions limits the solutions available to match to user inputs. I can't hope to store infinite inputs and so it's quite obvious that my web calculator is dramatically limited compared to the actual software used to do the precalculating.
What was interesting to me, other than learning how to create such a project, is that a poker player could make quite accurate decisions with only a small set of possible inputs. The most variable input is the stack sizes each poker player on the table has. For this web app I have used increments of the big blind, so rather than have players each with a number of chips that is any integer up to the biggest stack one can have, the inputs allowed are only functions of the big blind up to 20 big blinds (this won't make much sense to a non-poker player). This dramatically shrinks the search space. For a professional player this lack of accuracy might not suffice but for a less than professional (even a serious player or semi pro) this "novelty app" might be at least somewhat useful as a training tool for memorization.
What got me curious was that I can double the available search space with ease and the accuracy of solutions would increase perhaps two-fold without much of an increase in the computations needed (just a basic search but I don't claim this scales I'll learn about this later). I wonder then how accurate such solutions are compared to the actual calculator outputs if one could enter the actual stack size (my calculator requires you to estimate).
This is why I coded up a script using auto hot-key that would enter the inputs into the calculator used to precompute the solutions github code so that I could have variables to change which would give the ability to automatically increase the amount of precompiled solutions available. So the script opens up the calculator software and goes through the process of entering different stack sizes for different scenarios and computes the solutions. After a pause it then opens up the tree of solutions and copy/pastes them to a text file:
This text file then is used as a .csv and provides the solutions for the user inputs for the web app I created:
The web app has a novel feature as well (novel to those not familiar with crypto currency) in that you need to have sent a transaction to a specific address in order to receive your solutions. So for the app to work you must send a (test) ethereum transaction from meta-mask to the given address and then sign a challenge (also using meta-mask) proving you hold the associated private key:
For now the server side code just searches the receiving address to see if the signer has sent a transaction to it (you only need to send any fraction of test ether). The web app is set up for rinkeby test net right now but it uses the etherscan api so it would be quite easy to change to any other network with a similar api.
There are some interesting directions I could take this project and I am quite pleased to have this complete working code because I might end up pursuing some of these lines. It would be interesting to have a hand history reader that did the estimations for the inputs (ie if a player in a hand has 53960 chips the hand reader might round it to 50000) and if that was set up you could also use the script code to enter actual hands in the actual calculator and you could test my web app with the actual calculator. With enough of a sample you could get an idea how accurate the web app actually is. Knowing that you could use the script to precompute more solutions it might be interesting to see if there is a ceiling on how worth it is to be more and more accurate.
I sort of hypothesize that the web gets quite accurate quite fast in this context from a human to human stand point (ie you could beat humans but not bots with the novelty app).
The app is also interesting because in a sense it doesn't necessarily break terms of services for sites. Actually it might but the prototype I built used spreadsheets and using spreadsheets for shove charts although perhaps not perfectly legal is certainly acceptable from the general players point of view (it is common and implied with a full time tournament player although most have their estimates basically memorized).
I think about the possibility of a database with all precompiled solutions that different people are interested in (perhaps I might get requests for quick reference answers to specific situations). You could have entities (human players or bots) creating their own precompiled solutions and then entities that uses the app perhaps in real time (not very legal). As I understand, since the app is built using nodejs and runs on heroku, the project scales in this regard.
Lastly there are bugs I have to refresh the browser and meta-mask doesn't always pop up. But I think the basic security is there and now that I have a working system I can evolve different parts without worrying about breaking the whole of it.
Congratulations @jokerpravis! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit