ecnivo / blackjackai Goto Github PK
View Code? Open in Web Editor NEWAI for ICS4UE software engineering project.
AI for ICS4UE software engineering project.
Double buffer the thing Ugh
Replace it with something to calculate double downs. For double down, set a leeway constant, and from that many numbers to 21, if the chance of getting a total that's in the leeway, then double down
Eg leeway = 4, so calculate the chance of getting a card that's between 17 and 21, and compare that to the threshold (eg 22% of getting anything between 17 and 21, and the threshold is 15%) then double down.
The code is really ugly. We need to comment it all.
Under run my turn (?) just return double down and see what happens.
Make stopAI softer when it dies to permit looping through and finding best combinations of thresholds.
The current structure is... dare I say, a bit messy.
When decideMove is called, check if it's the first move by seeing how many cards you have (if there's more than two, then it's not your first move!)
If it's your first move, then do actions like checking for pairs or aces, and also double down protocol. If it's double down or aces (something special for those cases (second or third charts)), then just return whatever it is.
If it's not your first move (but don't use an else!), then use the first chart and do actions based on that.
As well, in terms of integrating card counting and other probabilities, you could call the method in different places depending on the chart that is being used... I'll do more work on it during the weekend.
When launching:
Prompt for IP and port number
Prompt for thresholds to use
During game:
Current cards
current action
Dealer's cards
Win/loss ratio
Percentage wins and losses
The threshold in use
Percent deviation from observed average (if time permits!)
Round number (how many rounds have passed)
Coins
So apparently there are different values that can get us better results.
JSpinners and de-finalize the constants.
The current IO protocol is pretty outdated; update!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.