|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
deck.txt
Is it anyone that has a deck.txt file that is possible to solve? I would like to test my program.
|
|
#2
|
|||
|
|||
|
RE: deck.txt
I found one my self:
QC 9D 1D 3D 10C 2D 5H 5C QS JS 7H KS JH QD KD JC KC 4C 9C 7C 3C 2C 8C 4D JD 1C 8D 10D 6C 7D 6D 3S 6H 5S 8H 5D 1H 10S 2H 3H 9S 1S 8S 4H 2S 6S KH 7S 4S 10H QH 9H |
|
#3
|
|||
|
|||
|
RE: deck.txt
My code can't manage this one, and yet it does do a logical move at every turn and never misses anything.
This brings up an interesting point: klondike isn't all that simple a game, and there are many ways to do things. Coding what "feels" right at first gave me a score of 210 in 65 turns. I rearranged the logic a few times and found that doing completely legal moves could also yeild 195 points in 61 turns or 140 points in 61 turns. All these were with the same deck, specified in the previous post. I'm not 100% sure my score is being calculated correctly, but I am sure my program is only making legal moves and isn't "missing" any moves. What I end up with at the end are three entirely different pictures. My question is, how many decks will be used to test our programs? Just because 2 or 3 end up giving worse results doesn't mean they will in the long run. I surely will be making my program take multiple paths to see which one turns out best. But if my code runs 4 times slower and gets on average 10 or 15 points more, is that a worthwhile tradeoff? Or should I focus on speed instead? What's a good speed to shoot for, 100 ms? |
|
#4
|
|||
|
|||
|
RE: deck.txt
A program that scores more points will always outrank a program that scores less. Regardless of speed.
That said, yes I will run multiple decks. Most like 4 decks. Each deck will be run through multiple times. Averages will be taken. The key to this whole challenge is making your program choose the best legal moves in the best order ;) |
|
#5
|
|||
|
|||
|
RE: deck.txt
> "program take multiple paths to see which one turns out best. "
I think it would break the rule: > There is no cheating allowed. Your program can only take into account the cards to are "face up" at any given time. IMHO, if you are playing several times with the same deck, you are cheating, because you are seeing hidden cards twice. On the other hand the algorithm here is the most important thing in this contest, and I feel that it is not right. It is like the hidden auction where every $0.01 counts. Maybe there could be more that one winner? ;-) BTW: that textarea field in the 'Post reply' HTML form should have more columns. |
|
#6
|
|||
|
|||
|
RE: deck.txt
If anyone is interested:
I have uploaded PHP code for generating random list of cards (deck.txt file). It is available in the Miscelanous code area: http://codewalkers.com/seecode/101.html |
|
#7
|
|||
|
|||
|
RE: RE: deck.txt
Quote:
However, as you can effectivly go through the deck 3 times, you should be able to remember the order that the cards (are already in). So you may wish to use a basic set of rules to go through the deck the first time, then pause while you use your new knowledge to work out a better stratagy, then use the next two passes of the deck to get a higher score. Z |
|
#8
|
|||
|
|||
|
RE: deck.txt
Quote:
You will have 3 passes through the stock it is stock not whole deck. |
|
#9
|
||||
|
||||
|
RE: deck.txt
Quote:
Since you go through the stock 3 cards at a time, is it cheating to remember the in-between cards? |
|
#10
|
|||
|
|||
|
RE: deck.txt
is the above posted deck-file really able to be solved? my program is not finished yet and it doesnt solve the deck-file. i only get 130 points :-(
:-) |
|
#11
|
|||
|
|||
|
RE: deck.txt
Quote:
I don't see anything in the rules against that. If you were really playing, you could remember those cards. In fact, professional players (yes there is such a thing for this game) probably do remember those cards.... |
|
#12
|
|||
|
|||
|
RE: deck.txt
The above deck.txt file is not solvable within the rules. You need to pass it 5 times to solve it (atleast I did.)
Below is 2 outputs from my code: 1) The maximum number of passes was 10 and the game was solved in 5. The Game has been solved! Total score: xxx Total cards moved: xxx Number of stock passes: 5 of 10 possible. Creation time: x.xxxxxxx seconds. 2) The maximum number of passes was set to 3 and the game was not solved. The game could not be solved! Total score: xxx Total cards moved: xxx Number of stock passes: 3 of 3 possible. Creation time: x.xxxxxxx seconds. I've removed some info from the outputs. |
|
#13
|
|||
|
|||
|
Recursiveness
"A program that scores more points will always outrank a program that scores less. Regardless of speed."
Does that mean if I create a recursive program, which will always come with a best solution, but will take ages to finish will always be the best? |
|
#14
|
|||
|
|||
|
RE: deck.txt
"A program that scores more points will always outrank a program that scores less. Regardless of speed."
I think that statement is pretty clear..... But to answer you, yes, if your program can gain more points than any other program, you will be the winner. If two programs score the same amount of points, then it will come down to speed. |
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > deck.txt |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|