School has been out for almost 2 week for winter break, and I decided I wanted to try something challenging. I started a Texas Hold ‘Em Poker app with the intention of using an HTML outline, CSS for styling, Javascript for the code, and MySQL for stats and game status. The final goal was to create a computer opponent who could read the previous starting cards, resulting hands, odds of hitting certain outs, and ultimately becoming a smarter poker player over time. Options for different skill levels or human opponents would also exist, but the adaptive AI is really the standout goal.

I quickly built the style, brought in a royalty-free deck of playing cards for images, created overlays for each poker hand (from “High Card” to “Royal Flush”), and organized how I would store the data. I took some time to teach the computer how to deal, then how to determine the final hand using the 7 available cards (the 5 cards on the table, and the 2 cards in each player’s hand). That was all working great.

When I tried to load everything into MySQL, for some reason I hit error after error. That was frustrating, because I’m familiar with MySQL and have successfully built with a LAMP model. I tried changing some of my HTML to PHP for the sake of familiarity, but I couldn’t get the JavaScript to communicate with the PHP the way I wanted. The app never updated my tables.

Now the project is a working nodeJS app, it’s deployed on Heroku, and I have an active (and currently empty) MongoDB linked to it.

Enter The Flu

I spent a few days out horribly sick, but as soon as I could breathe again, I was back at it. I started playing with nodeJS (which we’ll be looking at in class for the first time when school resumes), which led me to Heroku for deployment. I wasn’t ready to deploy it here, because DreamHost (my web host) wants me to upgrade to a VPS to run node, while Heroku will do it for free. In order to use Heroku’s MySQL addin, I need to give them my credit card number to validate. But I could use mLab’s MongoDB without giving my credit card information away! I’m pretty sure we’re 1-2 months away from MongoDB in class, but I like being ahead of the curve.

So now the poker project is a working nodeJS app, it’s deployed on Heroku, and I have an active (and currently empty) MongoDB linked to it. I’m excited to see where we go from here!

After 9 weeks of training, I’m building my own real-time interactive MERN adaptive AI project. (I assume I’ll hit React at some point as I continue for a cleaner UIX.) Anyone interested in a highly motivated Junior Programmer who learns fast, finds his own resources, and writes clean code?