Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old May 20th, 2002, 10:06 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
deck.txt

Is it anyone that has a deck.txt file that is possible to solve? I would like to test my program.

Reply With Quote
  #2  
Old May 20th, 2002, 10:45 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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

Reply With Quote
  #3  
Old May 21st, 2002, 04:23 AM
noda noda is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Montreal, Quebec, Canada
Posts: 20 noda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to noda
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?

Reply With Quote
  #4  
Old May 21st, 2002, 06:02 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
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 ;)


Reply With Quote
  #5  
Old May 22nd, 2002, 09:49 AM
makler makler is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 20 makler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old May 22nd, 2002, 11:26 AM
makler makler is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 20 makler User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old May 22nd, 2002, 05:59 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: RE: deck.txt

Quote:
> "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.

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

Reply With Quote
  #8  
Old May 22nd, 2002, 06:13 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: deck.txt

Quote:
You will have 3 passes through the stock

it is stock not whole deck.

Reply With Quote
  #9  
Old May 22nd, 2002, 07:56 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
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).


Since you go through the stock 3 cards at a time, is it cheating to remember the in-between cards?

Reply With Quote
  #10  
Old May 22nd, 2002, 09:02 PM
Da Olli Da Olli is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Germany
Posts: 1 Da Olli User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Da Olli
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 :-(
:-)

Reply With Quote
  #11  
Old May 22nd, 2002, 09:24 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
RE: deck.txt

Quote:
Since you go through the stock 3 cards at a time, is it cheating to remember the in-between cards?


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....

Reply With Quote
  #12  
Old May 23rd, 2002, 06:57 AM
Godlic Godlic is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 1 Godlic User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #13  
Old May 23rd, 2002, 02:40 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
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?

Reply With Quote
  #14  
Old May 23rd, 2002, 03:18 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 23 sec
Reputation Power: 6
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.




Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > deck.txt


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |