|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
solving the game with multiple tries
Hi
Some people asked about trying more than one algorithm to solve the game and at the end display the solution with the biggest score (since score is more important than speed). I think that's cheating, in a real game you can't 'Undo' (put back cards and then try another path). Matt? PS: I think not only the prizez are great, but a PHP contest idea is excellent. Thanks! |
|
#2
|
|||
|
|||
|
RE: solving the game with multiple tries
Playing more than one algorithm is acceptable by the terms of the rules. Each pass would need to "wipe its memory" of the previous pass though. As each algorithm is run through, it should only know of cards that are face up. If it "knows" what the last pass saw, that would be cheating.
On another note, yes score is most important, but speed does matter. What is going to happen to those programs that try 3-4 methods to get the best score when they match up against the script that uses the best algorithm only once to achieve the same score? I would recommend trying several algorithms during your testings, but only send in the final code with the best one.....but hey, code it how you will |
|
#3
|
||||
|
||||
|
RE: solving the game with multiple tries
Quote:
I totally agree with mandreiana. I also thinking of the same question. But i still have a qusetion on matt reply. Quote:
Try to picture that, there is 3 possible moves in a step(e.g. #5) like turnover column #1, move #2 to #4, draw stock. Can i try to turnover column #1 continue and then back to this step(#5) to try move #2 to #4, and get the best result? Ofcourse i will not take the face up card of the turnover column #1 as a know card? I think it's not valid. But if i follow matt answer, i can go through the deck use difference priority setting, let's say 1st try move is highest priority, 2nd try turnover is highest priority... and get the best result. Is it valid? i don't think so. It's hard to get a BEST algorithm, but it's easy play serveal times to get a BEST/ nearly BEST result. |
|
#4
|
|||
|
|||
|
RE: RE: solving the game with multiple tries
Quote:
I am also interested in an answer to this question!!! MaTT !!! :0 |
|
#5
|
|||
|
|||
|
RE: solving the game with multiple tries
By the rules I can not penalize a submission because it plays multiple algorithms. I stand by my answer that it is acceptable. Had I to do it over, I may not have allowed it, but at this point in the competition I cannot change that...
|
|
#6
|
|||
|
|||
|
solving the game with multiple tries
Matt said
>Each pass would need to "wipe its memory" of the >previous pass though. As each algorithm is run >through, it should only know of cards that are face >up. If it "knows" what the last pass saw, that >would be cheating. It won't remember the cards, only the score, which is enough to cheat IMHO. Anyway, will you list a winner script from the ones which solve the game in one pass? No prize, just the name. Thanks |
|
#7
|
|||
|
|||
|
RE: solving the game with multiple tries
Presumably, though, a program that tries multiple seperate algorithms is fine, but a program tht "forks" on any decision point, and tests for which path though the decision tree made the best score, would be cheating?
To put it another way, does "wiping the memory" include both the card information, and also the moves made? |
|
#8
|
|||
|
|||
|
recursive vs multipass
imho, the questions summarize to recursive algo vs multipass algo. A recursive algo would be like playing the game and then at each steps, when you see it doesn't lead somewhere good, just step back to the decision point and take another way. This is like walking a decision tree and is ,imho, sort of cheating.
On the other hand, running multiple passes on the same stock, taking each time a different way, BUT starting from the beginning of the game is like putting the cards back in your hand in the same order they were and playing the game again, but this time with a different path (and remembering the path you took is not cheating per se). This second approach is,imho, not cheating (because each time you start from the very beginning), but will of course require much more time to test every possible paths (and i wonder if it wouldn't be really long). only my 2 cents to the question (and apologize for my poor english, hope you see my point) Laurent |
|
#9
|
|||
|
|||
|
RE: solving the game with multiple tries
I agree with you that recursing is cheating, so I think I'll write such an algorithm :-)
|
|
#10
|
|||
|
|||
|
RE: solving the game with multiple tries
I can't actually see how remembering the path you took is in any way different from remembering the face-down cards. It's certainly not "wiping the memory" from the previous try.
Using a seperate pass, with a different algorithm (perhaps suppressing moving cards from stock to foundation, for instance) is fine by me, but in that instance, the only thing remembered would be which algorithm you've tried, and the score. |
|
#11
|
|||
|
|||
|
RE: solving the game with multiple tries
Quote:
Well, let's see this in real-life klondike : Moving a card from stock to tableau and then unmoving it (because you figured out it's not a good move) is not allowed (it's cheating). And this is exactly what recursive algo does. On the other hand, writting down each decision you take on a sheet of paper (or remembering it if you have very good memory) is certainly not disallowed. Then when you'll play the same game again (from the very beginning), nothing prevent you to compare what you are doing to what you have on your paper and take other decisions. That's why i said remembering the path is not cheating imho. Note however that if you have to play all possible path that way (ie, starting from the very beginning each time), i'm quite convinced (though i didn't try) it would last a very long time (recursive algo are much more faster in this case, due to the amount of decision points). That's why i agree with you that the best way, imho, is to execute a few number of passes, each time slightly varying some parameters (and eventually putting some random at work). This would make a compromise between speed and performance while still not cheating. And, of course, you guessed it, this is how i'm trying to solve the contest :-) Laurent. |
|
#12
|
|||
|
|||
|
RE: solving the game with multiple tries
It seems to me that unless you actually traverse every path (recursion), this turns out to be a game of luck. Even the best algorithm can be beaten by a less sophisticated one depending on the deck. And I doubt there's a set of algorithms that will cover enough paths to eliminate luck as a significant factor without using recursion.
Just my two cents. |
|
#13
|
|||
|
|||
|
RE: solving the game with multiple tries
This basic assumption of Klondike is that it's statistically nigh impossible to get the same deck twice. When you play two hands of solitaire, you're fully expecting that the deck will be different (because you've shuffled between).
Thus, to play multiple games remembering which algorithm you've used previously is not 'realistic play' (as per Matt's rule addendum). I would suggest that both recursive and multi-game strategies are cheating. |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > solving the game with multiple tries |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|