How to implement the win-conditions o... Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » How to implement the win-conditions of Turkish Checkers? « Previous Next »

Author Message
Uwe Wiedemann (Uwe)
Posted on Wednesday, June 06, 2001 - 6:16 am:   

One of the win conditions of Turkish Checkers is, that Black wins, if Black has only one king, and White has one and only one checker. How can I implement that win condition?
Roger J Cooper (Rogercooper)
Posted on Saturday, June 09, 2001 - 6:57 am:   

I can almost do this.
(win-condition (Black)
(and
(pieces-remaining 1 king)
(pieces-remaining 0 checker)
(absolute-config (not opponent king) (anywhere))
)
)
[anywhere is a zone that includes the entire board]

But this will still show as a win even if White has 2 more or checkers. It may be sufficient in practice.
Uwe Wiedemann (Uwe)
Posted on Tuesday, June 19, 2001 - 5:33 am:   

Thank you for the answer, but as you say yourself, it is not a solution for my problem.
Peter Aronson (Peteraronson)
Posted on Tuesday, June 19, 2001 - 12:04 pm:   

Another approach that can be taken is to have a neutral player scan the board after every player's turn, and if it detects the condition, captures some piece to trigger the actual victory conditions.

That's approach I used in Yote, but it degrades the quality of play by the engine somewhat. Strangely, when I made the neutral player a random player, which should have been legitimate, it completely killed the quality of play, at least at 1.2.
Dan Troyka (Dtroyka)
Posted on Tuesday, June 19, 2001 - 12:45 pm:   

Yet another approach would be to create a separate grid off board with dimensions of 2x16, a white token in column 1 on top, and a black token in column 1 on bottom. Now every time white captures a black checker, or every time a black checker promotes to a king, move the black token forward one space (using the cascade command). Do the same for the white token. When the token reaches column 16, this means that only one checker is left for that player.

Now, add a statement to Roger's coding:

(win-condition (White Black)
(and
(pieces-remaining 1 king)
(pieces-remaining 0 checker)
(absolute-config (not opponent king) (anywhere))
(absolute-config (opponent token) (token-zone))
))

where token-zone consists of positions A16 and B16 in the special grid.

I used this basic idea to create a maximum move limit in the "11-move challenge" variant of Duck Solo. Whether it will work with add-partial and maximum-captures commands, who knows?
Uwe Wiedemann (Uwe)
Posted on Friday, June 22, 2001 - 8:08 am:   

Thank you. I count now the captures on dummy positions, and the rule is working.

Uwe

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: