Jump to content
  • Advertisement
Sign in to follow this  
FreJa

black hole

This topic is 4442 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, You guys know black hole patience game? If not, see here: Black Hole. Ok, I was trying to solve this and I started my doing a simple depth-first search, which worked fine but it takes a few seconds to run. I was wondering... do you know any good algorithm to solve this? Thanks

Share this post


Link to post
Share on other sites
Advertisement
I can only think of some refinements of depth-first. For example, if all sevens are in the black hole and there are cards left out of the black hole that are both above and below seven, then you can stop the search.

Share this post


Link to post
Share on other sites
You should be able to do a brute force search to solve this. Your search would be aided by estimating the probability distribution over the remaining (unseen) cards on the table. Specifically, you want to estimate the probability that the next card turned up after putting a face card into the Hole is one higher or lower than either of the other two face cards. You could then bias your search toward maximising this probability?

As an alternative, just build a play book by back constructing it from possible end-game scenarios.

Cheers,

Timkin

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!