English subtitles

← Doubling Pigs Solution - Design of Computer Programs

Get Embed Code
1 Language

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. Here's my solution for pigactionsd.
  2. If you were challenged with a double, then the legal actions are accept and decline.
  3. If there's something pending, then you can either roll or hold.
  4. If there's nothing pending, then you can only roll.
  5. That's my initial description of actions.
  6. And then I add in if doubling is 1, then we append to whatever we computed before--
  7. that we're allowed to do the double action--and return that.
  8. I didn't describe my strategy function because there were so many good ones
  9. that people have come up with. There's lots of different choices.
  10. So I think the best thing is just look in the discussion forums
  11. and then you can see some options for ways to go for figuring out a good strategy.