Stalemate and pieces number Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Stalemate and pieces number « Previous Next »

Author Message
Stepanov (Stepanovoleg)
New member
Username: Stepanovoleg

Post Number: 8
Registered: 4-2021
Posted on Wednesday, April 28, 2021 - 2:33 am:   

Please, who can help?
I want realize loss-condition with two positions: stalemate and number of pieses more than 0.

I tryed
(loss-condition (White Black) and stalemated (pieces-remaining 1))

(loss-condition (White Black) (and (stalemated) (pieces-remaining 1)))

and lot of closed methods. Nothing work. What should I do?
Malcolm James Webb (Mjw)
New member
Username: Mjw

Post Number: 34
Registered: 5-2008
Posted on Saturday, May 29, 2021 - 6:55 pm:   

The goal "stalemated" is a top-level goal, and cannot be used in conjunction with anything else.

So the only legitimate way to use stalemate would be:
(loss-condition (White Black) stalemated)

Of course if a side has all its pieces captured that is a stalemate, as it cannot move if it has no pieces. But it seems that you want something different to happen if all the pieces are captured. Do you win or draw if your opponent captures all your pieces?

Assuming that it's a draw if you have no pieces left, then you could try:
(draw-condition (White Black) (pieces remaining 0))
(loss-condition (Red Black) stalemated)

Zillions would evaluate the "pieces-remaining" goal when your last piece was captured by your opponent and declare a draw.

But if it found that you still had pieces left at the end of your opponent's turn it then goes on to generate moves for you. If it finds that you are stalemated it then it declares that you have lost.

Incidentally (pieces remaining 1) is only true if you have exactly one piece on the board, not two, and not zero.
Stepanov (Stepanovoleg)
New member
Username: Stepanovoleg

Post Number: 9
Registered: 4-2021
Posted on Tuesday, June 29, 2021 - 12:06 pm:   

Ops. Apologize. Long time did not be here.
Look. It need for the game like draughts. We have special puzzles (compositions) where not need to win (eat all opponent dicks). We see position and question: How to clutch one Man? If you just eat all it will be not correct. Some time question: "Clutch one Man and one King" or "Clutch one King"...
Aleksey D. Tetyorko (Aleksisto)
New member
Username: Aleksisto

Post Number: 9
Registered: 7-2015
Posted on Wednesday, June 30, 2021 - 10:04 am:   

application/force-downloadpoddavki solver?! and more... maybe!
somezrfs.rar (1.7 k)


I've coded someth. of the sort 5 years ago. See attach. no warranty etc. All zrf are working.

aleksisto
Stepanov (Stepanovoleg)
New member
Username: Stepanovoleg

Post Number: 10
Registered: 4-2021
Posted on Wednesday, June 30, 2021 - 2:58 pm:   

Thanks, Mr. Aleksey Tetyorko.
I understand what you mean. First use 0 for opponent and only after stalemate. But, looks like on my version it is not work.

I wgote huge loss-condition block for any cell on board. But I still believe possible to do somthing short.
Aleksey D. Tetyorko (Aleksisto)
New member
Username: Aleksisto

Post Number: 10
Registered: 7-2015
Posted on Saturday, July 10, 2021 - 12:59 pm:   

AtomicBomb, maybe:
Degine AtomicBomb piece. It is initialy off board, can only be droped if the board is free of AtomicBomb owner's pieces(no zero count stalemate!). AtomicBomb being on the board is winning condition...

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: