addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [mad-railers] Ruby Quiz

From: Chris J.
Sent on: Friday, September 7, 2012 10:01 AM
I'm loving the solutions!  I didn't get to the shoe portion to make it more realistic but almost want to keep working on this in downtime since the problem domain is fun.

Cheers,
-CJ

On Fri, Sep 7, 2012 at 8:51 AM, Damon Butler <[address removed]> wrote:
For what it's worth, my solution is on my github comprehensive Ruby Quiz repo. (We've been doing this for several months now.)


~Damon


On Thu, Sep 6, 2012 at 8:00 PM, Brian Samson <[address removed]> wrote:
Hey Chris, cool idea and I spent way too much time playing with blackjack simulators instead of working :)


I implemented a strategy object that we can swap out to control the rules that each player plays by.  It's pretty cool to see a real strategy beat the socks off of just randomly hitting or standing:

Xandra:rubyquiz-blackjack bsamson$ ruby play.rb[masked] RandomStrategy
Using strategy: RandomStrategy

====== Done! ======
Games played: [masked]
Games won: 29831
Win rate: [masked]%

Xandra:rubyquiz-blackjack bsamson$ ruby play.rb[masked] WikipediaStrategy

Using strategy: WikipediaStrategy

====== Done! ======
 Games played:  100000
 Games won:  43175
 Win rate:  [masked]%


I do feel like the strategies are limited until we have betting, because the games rely on 3:2 payouts and doubling down and such in order to get closer to a break-even game. I'd love to see someone pick up where I left off.

Cheers, 
Brian

On Thu, Sep 6, 2012 at 8:09 AM, Chris Johnson <[address removed]> wrote:
Here is my solution so far.
https://github.com/johnsonch/rubyquiz-blackjack  I got to spend most
of my time working on this at the lake with no internet access, which
in my opinion was a great way to work on this.

-CJ

On Thu, Sep 6, 2012 at 8:06 AM, Chris Johnson <[address removed]> wrote:
> It looks like you have to send these messages via the email account
> you have hooked up with meetup.com.  Below is the ruby quiz (I know
> it's late) for this week, powered by Damon.
>
> -CJ
>
> First off, I'd like to welcome MadRailers to our (usually) weekly Ruby
> Quiz! Per last Monday's meeting, I've been "assigning" a quiz to to
> coworkers, which we then discuss the following Wednesday at lunch. If
> you're interested in solving the problem, please feel free to discuss
> it or post your solution to the list.
>
> On to this week's challenge, which was suggested by Chris Johnson: Blackjack!
>
> Simple enough. Write a program where you, the user, are up against the
> house in as many hands of blackjack as you are interested in playing.
> How closely you wish to hew to casino-style play (i.e., using a
> multi-deck shoe) is up to you.
>
> Good luck!
>
> ~Damon
>
>
>
> --
> Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
> http://www.meetup.com/Mad-Railers/
> This message was sent by Chris Johnson ([address removed]) from Mad-Railers.
> To learn more about Chris Johnson, visit his/her member profile: http://www.meetup.com/Mad-Railers/members/8960662/
> Set my mailing list to email me
>
> As they are sent
> http://www.meetup.com/Mad-Railers/list_prefs/?pref=1
>
> In one daily email
> http://www.meetup.com/Mad-Railers/list_prefs/?pref=2
>
> Don't send me mailing list messages
> http://www.meetup.com/Mad-Railers/list_prefs/?pref=0
> Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]
>



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/Mad-Railers/
This message was sent by Chris Johnson ([address removed]) from Mad-Railers.
To learn more about Chris Johnson, visit his/her member profile: http://www.meetup.com/Mad-Railers/members/8960662/
Set my mailing list to email me

As they are sent
http://www.meetup.com/Mad-Railers/list_prefs/?pref=1

In one daily email
http://www.meetup.com/Mad-Railers/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/Mad-Railers/list_prefs/?pref=0
Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]






--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Brian Samson ([address removed]) from Mad-Railers.
To learn more about Brian Samson, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Damon Butler ([address removed]) from Mad-Railers.
To learn more about Damon Butler, visit his/her member profile

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy