Thieves: Card game with
SCORELIST !!!
The game
Thieves is an easy to play card game. In the normal configuration, you
get 7 source decks, one auxiliary deck and a target deck. Initially the
source decks have 5 cards, the auxiliary 10 and the target 1 card. So we
have 7*5+10+1 = 46 cards. These 46 cards are 11 cards from each color (1-10
and J), and two wildcards.
The object of the game is to move all source cards to the target deck
using some rules.
To move a card from source to target:
-
They must differ in value by exactly one. For example: 1 and 2, 10 and
J,...
-
Or one of them must be a wildcard.
To move a card from auxiliary to target:
Take a look at the applet. All clouds will be gone.
How to play
Human play
-
Make sure the first selection box shows HUMAN.
-
Select source deck by hitting hit with the mouse.
-
If the possible checkbox is enabled, green bullets
appear indicating the possible moves.
-
If the animate box is enabled, you can see the cards
move from source to target deck.
-
Hit to RESET start
a new game.
-
If you are not satisfied with the move you made,
try the UNDO
button.
-
Can't decide wich move to make? Use HINT.
For each deck the average number of points/move will appear on screen and
the best one(s) are displayed on the status. Points/move is calculated
by backtracking trough the next possible moves till game is finished or
a specified maximum depth is reached.
-
The SETUP
field in the lower right corner can be used to alter the game parameters.
It's format is CARDS/DECKS/MAXDEPTH.
The CARDS parameter
can be any value less than 11. It specifies which cards get into the game.
If you enter 8 for example, the cards 1-8 of all colors will be in the
game. The DECK
parameter can be used to change the number of source decks. The maximum
is 7. MAXDEPTH
specifies the maximum depth used for calculating the HINTs.
If you change something in the setup field, hit the RESET
button, to make the changes visual.
Computer play
HINT PLAY
-
Make sure the first selection box shows HINT DEMO.
-
In this mode, the computer plays the game using the
hint in each step.
HINT DEMO
BACKTRACKING DEMO - 1
-
Make sure the first selection box shows BACKTRACKING-1.
-
Set the speed using the lower left selection box.
SLOW/MEDIUM/FAST/TURBO/WARP.
-
To return to human play, either choose HUMAN
from the selection box, or hit RESET.
-
The computer will backtrack through all possible
moves. Warning: usually this will take forever because the game depth is
maximum 46!!
BACKTRACKING DEMO - 2
-
Make sure the first selection box shows BACKTRACKING-2.
-
Same as backtracking 1, but only forward moves shown.
The Levels
You can play this game at different levels. Just pick one from the lower
right selection box. The available levels are: BABY/ALCOHOLIC/EASY/CASUAL/NORMAL/ROCKY/WICKET.
For each level I've made some statistics using the HINT-DEMO
mode. Here is the summary !
|
LEVEL
|
Cards
|
Decks
|
%Winning
n=1000, d = 1
|
%Winning
n=100, d = 5
|
| Baby |
5
|
3
|
85%
|
92%
|
| Alcoholic |
8
|
4
|
44%
|
61%
|
| Easy |
9
|
5
|
23%
|
40%
|
| Wicket |
11
|
6
|
16%
|
23%
|
| Casual |
10
|
6
|
9%
|
20%
|
| Rocky |
11
|
5
|
8%
|
17%
|
| Normal |
11
|
7
|
2%
|
4%
|
By the way: 'n' is the number of games played and 'd' is the 'Hint'
search depth.
High Score List
There is a high-score list for two different levels.
The Applet; HighScore List: Easy,
Normal
Backtracking is a usual. Do a move at a given depth. Call recursive procedure
to do next moves at higher depths. After procedure returns undo move at
this depth an try another if still possible moves left over at this depth.
public void playGame() {
if (isDone()) {
...
} else {
//Try source decks
for (int i = 0; i <
num_deck; i++) {
if (getSource(i).isAllowedTo(getTarget())) {
moveFromSource(i);
playGame();
moveToSource(i);
}
}
//Try auxiliary deck
if (!getAuxiliary().isEmpty())
{
moveFromAuxiliary();
playGame();
moveToAuxiliary();
}
}
}
Index Page