FreeAlgos
FreeAlgos
  • Threads: 1
  • Posts: 1
Joined: Jan 29, 2017
January 29th, 2017 at 7:27:18 PM permalink
So I was thinking there really shouldn't be a reason that computational Blackjack simulators should cost money. Blackjack is a simple enough game for a college com sci class to implement, so what's the difference if you add in some basic strategy charts and a betting scheme?

So I wrote one in C. You basically get full control of what goes on, and I have allowances for a decent chunk of rule variations like hit/stand 17 or Blackjack payout to allow for those items to be changed very quickly. As for other rules, for example, specifically allowing doubling after splitting on certain hands, that's another jump in implementation. Achievable certainly, but it's another conceptual checkpoint for sure.

I have a YT video where I demo the simulator. Search for Free Algos in YouTube.

I also have a git page, where you can download the code - look for "freealgos". It is released under the MIT license so you can do anything you want with it long's you don't blame me for losing your leg while using it or something.

Just:
Download the code pack from git
Make editions to blackjack.h according to your game of interest
Compile and run freealgos.c in console, calling solely blackjack_sim() in the main() function of freealgos.c
And you'll get the simulated long term results in the console, plus the cash in or out for each game in a text file.

Thanks, peace!
CoopOwnz
CoopOwnz
  • Threads: 5
  • Posts: 11
Joined: Oct 29, 2016
February 5th, 2017 at 9:08:53 PM permalink
Is your simulator multi-threaded? When I first built a simulator it was much too slow because it only ran on 1 processor. To get good sample sizes you need to be running many millions of hands. Making your simulator become faster is what's difficult.

I released a multi-threaded simulator for Android phones. I noticed that the average phone processors I tested were 1/3 to 1/4 slower then my PC. Utilizing 4 cores.

Just search "Blackjack all in one trainer" on the google play store and it should be the first option with a green circle icon.

The simulator was a great way to get better at writing efficient code. Much fun to make. Good work.
Actuarial
Actuarial
  • Threads: 12
  • Posts: 105
Joined: Apr 23, 2014
February 14th, 2017 at 3:45:33 PM permalink
For someone who has little to no experience with C, how exactly do I go about finding and running this program?
  • Jump to: