|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Blackjack] Good luck!
Good luck everyone!
You can check GMT time at http://g-m-t.com/index.htm. There are about 15 minutes left right now! Once the deadline passes, share your strategy with everyone in this thread! |
|
#2
|
|||
|
|||
|
[Blackjack] RE: Good luck!
Well, this was my first competition, and it was quite a lot of fun figuring out a strategy for this- even though mine might actually not do better than miniplay...
I only heard about this a few days ago, and after a refresher in card counting theory, and re-reading the rules, I realize any systems out there would be pretty useless. I did however use the effects of removal to determine betting strategy, because I did not have time to simulate these 16 (er, 160) different games to come up with appropriate tables. I also used basic strategy splitting tables, although it would have been possible to integrate it into my algorithm. My version keeps track of the number of each card number left in the shoe. This can let you determine the dealer's probability of busting or getting any hand. By applying the same logic to the player's hand, it is possible to determine the player's expectation. Naturally, with more time it should have been possible to recurse this while accounting for the effects of card removal. What I wanted to get was the expected value for each play: how much money is lost by hitting vs. standing or doubling, etc... The EV was defined as the %win - %loss, naturally ignoring the % of ties; an idea I took from the Theory of Blackjack by Griffin. One "d'oh!": after sending my submission I realized that the surrender function -which I added at the last minute- was probably not using the right numbers... If hitting and standing are both losing hands, with a negative EV, it probably makes sense to surrender when possible. Doubling when $ev_hit>($ev_stand*2). I did not have time to code the case of splitting I'll keep an eye out for future contests so as to not be so rushed... Good luck to everyone! |
|
#3
|
|||
|
|||
|
[Blackjack] RE: Good luck!
I submutted my code just before it ended and havent got any confirmation till now... do I need to fear somethings messed up?
|
|
#4
|
|||
|
|||
|
[Blackjack] RE: Good luck!
aw still no reply yet... I hope my submission made it allright to compete...
|
|
#5
|
||||
|
||||
|
[Blackjack] RE: Good luck!
I think the replies are written and sent manually so you shouldn't have to worry so much if it takes some time
|
|
#6
|
||||
|
||||
|
[Blackjack] RE: Good luck!
This was my first ever codewalkers php contest. In fact, this is the first php contest I've ever done. It was fun, but next time I need to plan my time better and perhaps think through what is possible more clearly before I start to write code. As I wasn't being paid for this, I didn't take a detailed systems analysis approach, which is probably why I took the route I did.
Quote:
Well, in the comments at the top of my code I included my strategy so it would be explained to all who looked on the FTP site after the comp is done and dusted. I repeat those comments here: Quote:
... then the code begins. I basically used a basic single-deck strategy which is the only one I could remember, and whilst wizardofodds.com had great tables for multiple deck and different rules, I didn't have time to implement them. Especially as I had already concluded I was writing this the wrong way, I didn't care. The right way was to do the hard maths. The way I figured it, I wanted my script to play the way I would, and it's so long since I last played Blackjack for money, that's the way I would play it. If work hadn't been so hectic, what I would have done instead is to keep a VERY detailed count of the cards going by - not just adding one for high, deducting one for low, but counting how many tens, how many jacks, etc... I'd then towards the end of a shoe be able to accurately predict my chances of making a blackjack and be able to stake, double, hit and stand accordingly. As it is, what I did is what I did. Good luck to all, and if I do finish in the money (i.e. eligible for prizes) below you, whatever you do, don't leave me with a domain name for a month or a t-shirt. :-) |
|
#7
|
|||
|
|||
|
[Blackjack] RE: Good luck!
My approach was quite independant from any knowledge of other persons. I read though a paper about russian black jack by Vladimir Mazalov. Sadly I didnt understand alot of but but by coding my own recursive algorithm for total enumeration it showed up beeing quite similar to the approach of Mazalov using optimal stopping theory / Belman equation / recursion backwards method.
There are 2 main problems with that. On low points, especially with aces considered as 1 it is not feasable to compute in the given timeframe. So I had to limit the recursion etc.. The other main problem is that each hand is played independant - I have not considered using lots of cards will decrease winning probability on other following hands. I would have done that but time was not my friend last week Aswell I am allways going for MaxBet. But I actually see no situation where, at bet time, your chance to win is lower than 1. But there gotta be some sitations I bet. Had no time to read and understand your soltions right now... Good luck all of you! Best Regards Zulan |
|
#8
|
|||
|
|||
|
[Blackjack] RE: Good luck!
I took the bayesian approach. I made a training script that counted the number of times, and under which circumstances, a certain result was achieved. After a LOT of training games, the script will be able to calculate the expected value for each possible play, for given circumstances. Of course, the EV for a surrender is always -.5. I also let my script calculate an EV before i made a bet(based on the card count). There was a slight correlation between this EV and the final result of the hand, (I plotted the results against the EV)so I decided to bet in three categories based on the EV:
EV<-.2 : bet 2 (there's always a chance for blackjack, so always bet even) EV>-.2 & EV<-.03 : bet half the maximum, rounded upwards to the next multiple of two EV>-.03 : bet the maximum. The numbers are based on the line of best fit. Fun facts: my final script only contained about 200 lines of code the line containing the bayesian array is about 120 KB (defines array) the average gain of the script lies somewhere between 17 and 18 the final script uses an array that is build from 100000 random training decks. this training took about a day. Basically, the script taught itself to play blackjack. It was a lot of fun and quite educational to code this. I'm highly curious about the results and other people's code. |
|
#9
|
||||
|
||||
|
[Blackjack] RE: Good luck!
I don't like losing so I didn't enter....
But good luck to all who did. I'm interested to see who had the best strategy. |
|
#10
|
|||
|
|||
|
[Blackjack] RE: RE: Good luck!
Quote:
If there was a prize for the most insane entry, I think you get it. I had never even thought about taking a Bayesian approach, but thinking about it, it does appeal to me simply because it means your script has an element of fuzzy memory about it. I suspect you could have improved it by "teaching" it to count cards as well to understand it's probability of winning and also to adjust betting - i.e. when lots of high cards in the deck bet big, and when there are lots of low cards, keep it short. Interesting though. Good luck. |
|
#11
|
|||
|
|||
|
[Blackjack] RE: Good luck!
It was my first time in a contest. I think I totally messed it up, because I calculated probabilities on each hand. I think I should have played my first hands using if-else rules, then calculate the probabilities when there is less than 100 cards left in the deck.
My code usually beats the dealer, but 10 decks take 939 seconds to compute on a Pentium3/650MHz, so I am gonna have huge penalties. ...hope to win a t-shirt! |
|
#12
|
|||
|
|||
|
[Blackjack] RE: Good luck!
Mine is bout 650 loc.. but half of it is repeating functions with different names and slightly different behavior. Due to high frequency calls I prefered that towards using one, but more dynamic function.
I thought about the training thingy aswell but there are just to many situtaions in the game to get a "complete" record. Regards Zulan |
|
#13
|
|||
|
|||
|
[Blackjack] RE: Good luck!
My script probably sucks lol, but that's ok, it's only my first contest
Good luck to all who entered! |
|
#14
|
|||
|
|||
|
[Blackjack] RE: RE: Good luck!
Quote:
So does mine... Im also here for the first time. Dont feel ashamed post some details of your script cmon bahhh.. I can't wait until Judging is over |
|
#15
|
|||
|
|||
|
[Blackjack] RE: Good luck!
I didn't enter either. I was going to, but I never figured out the PlaySplit() and some other functions. My logic was pretty simple... stay on hard 17, stay on soft 19. I had a neat way of determining and incrementing money that made it possible to lose three or four hands in a row, and then win and still post a profit. I had some logic errors somewhere, and I just didn't have time to work them all out. Oh well, maybe next time.
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > [Blackjack] Good luck! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|