Triplemove and getting out of check Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Triplemove and getting out of check « Previous Next »

Author Message
epicurus (Epicurus)
New member
Username: Epicurus

Post Number: 1
Registered: 11-2012
Posted on Thursday, November 01, 2012 - 6:48 am:   

Hi to everyone. This is my first post here. :-)

I'm trying to code my game, Kingdrops: http://www.chessvariants.org/index/displaycomment.php?commentid=29503

In each turn players make 3 moves. So I'm having trouble with this rule: "It is mandatory to get the king out of check within the first move". How can I implement it?

Many thanks in advance,
Matteo
epicurus (Epicurus)
New member
Username: Epicurus

Post Number: 2
Registered: 11-2012
Posted on Monday, November 05, 2012 - 1:44 pm:   

I introduced the rule "out of check in the first move" otherwise the king would be difficult to checkmate.

But it impossible for me to implement this rule. So, currently I have implemented the following rule: "it is possible to capture the king and if the king is under attack he can move only with the first move".

This rule is easy to implement, with low computation complexity and the king is not difficult to capture.

The only problem with this solution is the AI sometimes forget to move the king with the first move if he is under attack, losing very quickly.

I have increased the value of the king (with extra adds) in the hope of avoiding this problem. Someone can help me?
epicurus (Epicurus)
New member
Username: Epicurus

Post Number: 5
Registered: 11-2012
Posted on Thursday, November 08, 2012 - 12:21 pm:   

Increasing the value of the king the problem seems solved.

How can I implement this rule "if the king is attacked, then the piece P can make the move M"?
epicurus (Epicurus)
New member
Username: Epicurus

Post Number: 6
Registered: 11-2012
Posted on Monday, November 19, 2012 - 4:07 am:   

Basically, I need to know where the king is, but I don't know how to do that. Any ideas? :-)

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: