[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Comments by Matteo Perlini
![A game information page](/index/game.gif)
![A piececlopedia entry](/index/piececlopedia.gif)
How is the value of alibaba compared to other orthodox pieces in a 8x8 board? By intuition I would say 3/4 of a knight.
Thanks John for you exhaustive reply. The problem for having 4 alibabas on different "colors" is you should have 2 alibabas on the first row and 2 on the second row. But the majority of CVs has just pawn on the second row. Anyway I would like to know if there is a general formula to determine the piece's value on 8x8 board with FIDE rules. Or a table with the values of the most common pieces.
Hi, how good are softwares in playing multi-move CVs? The branching factor is much higher than one-move CVs so I'm curious to know the game-play quality. Moreover, does anyone know the game-tree complexity of the most popular CV, Marseillais Chess?
Hi everybody. This is my first significant contribution to the CV.org community but I read a lot of really interesting pages on here. Now I would like to propose my chess variant. ;-)
I wanted to create a cv that satisfy this main goal: the game should have a big strategic depth. (A minor goal was to keep the normal equipment for facilitating the access to the game for the common man.)
I divided this main goal into three subgoals:
1. big game-tree
2. great clarity, that is easy to look ahead or easy to see down the game tree
3. more global winning conditions
To reach the first subgoal my cv has:
a. multi-move turn
b. not fixed setup
c. drop rule
To reach the second subgoal my cv has
d. pieces with easy-to-visualize-movement
e. short range pieces
f. limited squares where to drop the pieces
g. multi-move with each piece can move just one time per turn
To reach the third subgoal my cv has:
h. besides checkmate, a player can win by getting one of the minor pieces to the last row
I have more and more playtests to do, so probably the rules will change. But I would really like to know your feedbacks on how to improve the game especially about the subgoals I wrote.
Thanks in advance and sorry for the grammar errors. :-)
I wanted to create a cv that satisfy this main goal: the game should have a big strategic depth. (A minor goal was to keep the normal equipment for facilitating the access to the game for the common man.)
I divided this main goal into three subgoals:
1. big game-tree
2. great clarity, that is easy to look ahead or easy to see down the game tree
3. more global winning conditions
To reach the first subgoal my cv has:
a. multi-move turn
b. not fixed setup
c. drop rule
To reach the second subgoal my cv has
d. pieces with easy-to-visualize-movement
e. short range pieces
f. limited squares where to drop the pieces
g. multi-move with each piece can move just one time per turn
To reach the third subgoal my cv has:
h. besides checkmate, a player can win by getting one of the minor pieces to the last row
I have more and more playtests to do, so probably the rules will change. But I would really like to know your feedbacks on how to improve the game especially about the subgoals I wrote.
Thanks in advance and sorry for the grammar errors. :-)
All rules of Orthodox Chess (FIDE Chess) apply, but with the following modification.
MINOR PIECES
4 spearmen: move one square straight forward
4 archers: move one square diagonally forward
MAJOR PIECES
2 rooks: move up to three square orthogonally (no castling)
2 bishops: move up to three square diagonally
2 guards: move to any orthogonally or diagonally adjacent space
1 queen: move up to two square orthogonally or diagonally
1 king: move to any orthogonally or diagonally adjacent space
SETUP
The game begins with an empty board. White player places in his first two rows all the pieces. The order of the pieces is up to the white player.
When White has finished, the same procedure is followed by the black player.
Shown below is a possible configuration after both players have chosen their starting position.
![](http://s12.postimage.org/fune8er31/small.jpg)
TURN
A player can make up to three moves per turn. He has to do the maximum number of moves available. If he has no move available, he pass.
One move consists in one of the two following actions:
- dropping a new piece in the board from the reserve;
- moving a pieces on the board that it is not moved or dropped in the present turn.
Just one drop per turn is allowed.
EXCHANGE
When a player captures a Spearman, an Archer or the King this piece is permanently removed from the game, but the other pieces go into the opponent's prison.
At the end of the turn, if a player has in his prison a type of piece already present in the opponent's prison (rook and rook; bishop and bishop; guard and guard; or queen and queen), there is the prisoners' exchange: the white piece in the black prison is moved to the white reserve, the black piece in the white prison is moved to the black reserve.
The prisoners' exchange is mandatory and is not a move.
DROPPING
Dropping consists in a player moving a piece from his reserve to the board, placing the piece in a empty square chosen between the eight squares adjacent to the king.
THE KING
- No check or checkmate.
- The king can move into a square under attack.
- The king can be captured like the other pieces.
- If the king is under attack, the player can move it only with the first move.
OBJECTIVE
The winner is the first player who reach one of the two following objectives:
- capturing the opposite king;
- getting the King or a Spearman or an Archer to the last row (the eighth row for the white player and the first one for the black player).
The three times repetition of the same position (considering the pieces on the board and in the reserve) is a loss.
[Rules updated on January 7, 2013]
MINOR PIECES
4 spearmen: move one square straight forward
4 archers: move one square diagonally forward
MAJOR PIECES
2 rooks: move up to three square orthogonally (no castling)
2 bishops: move up to three square diagonally
2 guards: move to any orthogonally or diagonally adjacent space
1 queen: move up to two square orthogonally or diagonally
1 king: move to any orthogonally or diagonally adjacent space
SETUP
The game begins with an empty board. White player places in his first two rows all the pieces. The order of the pieces is up to the white player.
When White has finished, the same procedure is followed by the black player.
Shown below is a possible configuration after both players have chosen their starting position.
![](http://s12.postimage.org/fune8er31/small.jpg)
TURN
A player can make up to three moves per turn. He has to do the maximum number of moves available. If he has no move available, he pass.
One move consists in one of the two following actions:
- dropping a new piece in the board from the reserve;
- moving a pieces on the board that it is not moved or dropped in the present turn.
Just one drop per turn is allowed.
EXCHANGE
When a player captures a Spearman, an Archer or the King this piece is permanently removed from the game, but the other pieces go into the opponent's prison.
At the end of the turn, if a player has in his prison a type of piece already present in the opponent's prison (rook and rook; bishop and bishop; guard and guard; or queen and queen), there is the prisoners' exchange: the white piece in the black prison is moved to the white reserve, the black piece in the white prison is moved to the black reserve.
The prisoners' exchange is mandatory and is not a move.
DROPPING
Dropping consists in a player moving a piece from his reserve to the board, placing the piece in a empty square chosen between the eight squares adjacent to the king.
THE KING
- No check or checkmate.
- The king can move into a square under attack.
- The king can be captured like the other pieces.
- If the king is under attack, the player can move it only with the first move.
OBJECTIVE
The winner is the first player who reach one of the two following objectives:
- capturing the opposite king;
- getting the King or a Spearman or an Archer to the last row (the eighth row for the white player and the first one for the black player).
The three times repetition of the same position (considering the pieces on the board and in the reserve) is a loss.
[Rules updated on January 7, 2013]
Very very interesting topic. I try to put some input: 1. About a minimal modification of FIDE chess for lowering the 1st-move ad. If promotion is so much important factor in causing the 1st-move ad, we can just weaken the promotion, i.e. promoting the pawn to a ferz. 2. What do you think about the 1st-move ad of Balanced Marseillais chess? 3. I think it is quite safe to say that, in general, with the increasing complexity (size of the game tree) of a chess variant we have a decreasing the 1st-move ad, due to the “noise†factor. In that respect I expect the 1st-move ad is much low in Chief than in FIDE chess. 4. I read in Arimaa the 1st-move ad is considered null (even if it is a race game). What do you think about that? Maybe not null but very very small… The reason maybe is because the very high complexity of the game. (Or maybe it relevant the shortrange nature of the pieces too.) 5. About detecting the strength of the 1st-move ad in Chief. You can play Chief with the first player passing the first 5 (or more) turns.
![A piececlopedia entry](/index/piececlopedia.gif)
I thanks to all of you for the intriguing posts. I keep following the discussion.
----H.G. Muller----
Empirical values of symmetric short-range leapers suggest that the the value is mainly determined by the number N of moves they have (when unobstructed), according to the approximate formula value (30+5/8*N)*N. Measurements on asymmetric and divergent pieces suggest that forward moves in this respect contribute roughly twice as much value as sideway or backward moves, and captures contribute roughly twice as much as non-captures.
-------------
I need examples for determining the value of N. The pawn move in 1 square (forward move) and capture in 2 square (forward moves). The ferz move and capture in 4 square (2 forward moves and 2 backward moves) and it is color-bond. How the value of N is calculated for pawn and ferz?
----H.G. Muller----
Empirical values of symmetric short-range leapers suggest that the the value is mainly determined by the number N of moves they have (when unobstructed), according to the approximate formula value (30+5/8*N)*N. Measurements on asymmetric and divergent pieces suggest that forward moves in this respect contribute roughly twice as much value as sideway or backward moves, and captures contribute roughly twice as much as non-captures.
-------------
I need examples for determining the value of N. The pawn move in 1 square (forward move) and capture in 2 square (forward moves). The ferz move and capture in 4 square (2 forward moves and 2 backward moves) and it is color-bond. How the value of N is calculated for pawn and ferz?
I really curious too. In the past I made some internet researches but didn't find anything satisfying. So I hope someone can find some reliable statistics. Anyway, I could find just these two pages (of the same author): http://shogi.typepad.jp/eweblog/2009/06/winning-percent.html https://groups.google.com/forum/?fromgroups=#!topic/shogi-l/GixqTlUmSpI
Hi Jeremy, I measure quality of play with computer vs. competent humans matches. Derek, I don't understand how it is possible the branching factor of MC is the same of chess. The available (multi-)moves per turn are much more that chess. I heard MC is quite a violent and brutal game so I imagine the game is much quicker than chess... but I would like to know if the MC would be last as much as chess what would be the size of the game tree.
Hi Christine, thanks.
>>> I love the idea of drops having to be placed beside the king, and that means also you could do 3 drops on one turn, right?
No, the current rule is just 1 drop per turn. I think this create an interesting tension when you have to choose between moving 3 pieces and moving 2 pieces and drop one. If you would have up to 3 drop per turn this tension would be removed from the gameplay. Moreover, I believe multi-drops per turn makes the game too much defensive.
Hi Michael, thanks to you too.
>>> The triple move idea is untried, so far as I know, and will need play testing to see if it makes the game too explosive. If that is the case, this game should still keep most of its flavor as a double move variant. (Hope triple move works out, I really like that.)
I have played too few games for having a reliable opinion, but for now 3-moves per turn seems working well. I think this is made possible by 2 factors: 1) short-range pieces and 2) a piece can move just once. But we will see.
>>> In any case, a balance rule to reduce the first move advantage is in order. For a double move game, the rule is well known--White may make only one move on the first turn. I propose a triple move analog to that rule:
>>> On the first turn, White makes one move. On the first turn, Black makes one or two moves. On the second turn, White makes one or two moves. On subsequent turns, the player on move makes one, two, or three moves.
Balancing the game is where I had/have much to think about. Here I presented the rules in this form because one of my last thought was to try as in Arimaa: proposing the simplest form (without the exceptions for the first turns) hoping the non-fixed setup can neutralize the first move advantage.
I see your proposal as problematic because it gives the advantage to the second player, and this advantage is summed to the advantage given by being the last player in the non-fixed setup.
Maybe a solution can be this: in white's first turn 1 or 2 moves, after that up to 3 moves. This gives a small advantage to white but black has the advantage from the not-fixed setup.
What do you think?
>>> I love the idea of drops having to be placed beside the king, and that means also you could do 3 drops on one turn, right?
No, the current rule is just 1 drop per turn. I think this create an interesting tension when you have to choose between moving 3 pieces and moving 2 pieces and drop one. If you would have up to 3 drop per turn this tension would be removed from the gameplay. Moreover, I believe multi-drops per turn makes the game too much defensive.
Hi Michael, thanks to you too.
>>> The triple move idea is untried, so far as I know, and will need play testing to see if it makes the game too explosive. If that is the case, this game should still keep most of its flavor as a double move variant. (Hope triple move works out, I really like that.)
I have played too few games for having a reliable opinion, but for now 3-moves per turn seems working well. I think this is made possible by 2 factors: 1) short-range pieces and 2) a piece can move just once. But we will see.
>>> In any case, a balance rule to reduce the first move advantage is in order. For a double move game, the rule is well known--White may make only one move on the first turn. I propose a triple move analog to that rule:
>>> On the first turn, White makes one move. On the first turn, Black makes one or two moves. On the second turn, White makes one or two moves. On subsequent turns, the player on move makes one, two, or three moves.
Balancing the game is where I had/have much to think about. Here I presented the rules in this form because one of my last thought was to try as in Arimaa: proposing the simplest form (without the exceptions for the first turns) hoping the non-fixed setup can neutralize the first move advantage.
I see your proposal as problematic because it gives the advantage to the second player, and this advantage is summed to the advantage given by being the last player in the non-fixed setup.
Maybe a solution can be this: in white's first turn 1 or 2 moves, after that up to 3 moves. This gives a small advantage to white but black has the advantage from the not-fixed setup.
What do you think?
Thanks Derek for the pdf. Jeremy you are totally right. I don't know why I forgot the arranging phase in Arimaa. Of course this is a relevant factor, even if we don't know how strong this factor is compared with the other 2 I have told (high complexity of the game and shortrange pieces). Maybe I should talk about Shogi instead. (By the way, a new discussions has been open about the first move advantage in Shogi.) Shogi is very close to Chess but it seems much more balanced. Why?
Christine, thank you for the compliment. ;-) Michael, I think it is better to keep the rule as simpler as possible: keeping the rules without the exception in the first turn. In case, in the future the two-moves-in-the-white's-first-turn could be added. >>> I think my rule is about right for a triple move game with a) fixed setup b) random setup or c) players choose setup by placing one piece at a time in turns. With an odd number of moves per turn the perfect balancing is impossible. Why do you think a 1-move-advantage of black is better than a 1-move-advantage of white?
Hi Rich. ;-) Guessed right, my variant has no leapers for clarity. But also for “elegance†(or, at least, for “how I see elegance and coherence/harmonyâ€). Yes I have Zillions. Now I have to start to study for writing code for it. I think it will be quite difficult because I have to implement a lot of features: restricted dropping rule, 3-moves per turn, arrangement phase, exchanging rule and multi-objectives. Too much! But I will try. :-)
For now I found those 2 problems in the implementation of Kingdrops: 1. no piece can move more than once per turn: I have found a solution for 2-moves per turn ("verify not-last-to?") but I'm without solution for my 3-moves per turn 2. how can I restrict the dropping zone to the king's 8 adjacent squares? 3. the king has to get out of check in the fist move... but how? (maybe this is impossible in zillions?)
Hi Jorg,
I don't think it was just a statistical fluctuation in 2008. There were "2,323 public matches in fiscal 2008", not few matches. Maybe it is because Shogi is really balanced?
I would like to hear some comments from someone with a strong statistical knowledge.
p.s. Small sample, anyway: http://www.iggamecenter.com/stats/game95.html
Number of wins by the 1st player (excluding quits) 285 (41.91%)
Number of wins by the 2nd player (excluding quits) 357 (52.50%)
I don't think it was just a statistical fluctuation in 2008. There were "2,323 public matches in fiscal 2008", not few matches. Maybe it is because Shogi is really balanced?
I would like to hear some comments from someone with a strong statistical knowledge.
p.s. Small sample, anyway: http://www.iggamecenter.com/stats/game95.html
Number of wins by the 1st player (excluding quits) 285 (41.91%)
Number of wins by the 2nd player (excluding quits) 357 (52.50%)
Hi. This is my second contribution to the CV.org community.
My new creation is DoubleRace, where I wanted to explore the main goal I imposed to my Kingdrops. That is, the game should have a big strategic depth.
I divided this main goal into two subgoals:
1. big game-tree
2. great clarity, that is easy to look ahead or easy to see down the game tree
For reaching the first subgoal my cv has:
a. three-move per turn
b. 10x10 board and 20 pieces per side
For reaching the second subgoal my cv has:
c. just 3 type of pieces
d. pieces with easy-to-visualize movements
e. short range pieces
f. multi-move with each piece can move just one time per turn
I would like to know your feedbacks on how to improve the game.
I wrote the zillions file. You can download it here: DoubleRace zillions files
My new creation is DoubleRace, where I wanted to explore the main goal I imposed to my Kingdrops. That is, the game should have a big strategic depth.
I divided this main goal into two subgoals:
1. big game-tree
2. great clarity, that is easy to look ahead or easy to see down the game tree
For reaching the first subgoal my cv has:
a. three-move per turn
b. 10x10 board and 20 pieces per side
For reaching the second subgoal my cv has:
c. just 3 type of pieces
d. pieces with easy-to-visualize movements
e. short range pieces
f. multi-move with each piece can move just one time per turn
I would like to know your feedbacks on how to improve the game.
I wrote the zillions file. You can download it here: DoubleRace zillions files
All rules of Orthodox Chess (FIDE Chess) apply, but with the following modification.
PIECES
8 rooks: move up to two square orthogonally (no castling)
8 bishops: move up to two square diagonally
2 kings: move to any orthogonally or diagonally adjacent space; or move two squares forward but without capturing and without passing or stopping in a square under attack
King's movement:
![](http://s7.postimage.org/ac7vhfjh7/king.jpg)
King can move with or without capturing to any red spot. Or King can move without capturing to any green spot, but, for example, if the king move to the "1" green spot, both the "1" red and green spots must not be under attack.
SETUP
The game begins with a board as in the picture below:
![](http://s11.postimage.org/gq9n1blxf/Double_Race_setup.jpg)
TURN
In the first turn, white has to make one move. After that, each player has to make three moves per turn.
OBJECTIVE
No checkmate. The kings can be captured.
The winner is the first player who reach one of the two following objectives:
- capturing the two opposite kings
- getting one king to his last row (the tenth one for the white player and the first one for the black player)
The repetition of the same position for the third time is a loss. The player in stalemate loses the game.
PIECES
8 rooks: move up to two square orthogonally (no castling)
8 bishops: move up to two square diagonally
2 kings: move to any orthogonally or diagonally adjacent space; or move two squares forward but without capturing and without passing or stopping in a square under attack
King's movement:
![](http://s7.postimage.org/ac7vhfjh7/king.jpg)
King can move with or without capturing to any red spot. Or King can move without capturing to any green spot, but, for example, if the king move to the "1" green spot, both the "1" red and green spots must not be under attack.
SETUP
The game begins with a board as in the picture below:
![](http://s11.postimage.org/gq9n1blxf/Double_Race_setup.jpg)
TURN
In the first turn, white has to make one move. After that, each player has to make three moves per turn.
OBJECTIVE
No checkmate. The kings can be captured.
The winner is the first player who reach one of the two following objectives:
- capturing the two opposite kings
- getting one king to his last row (the tenth one for the white player and the first one for the black player)
The repetition of the same position for the third time is a loss. The player in stalemate loses the game.
![A game information page](/index/game.gif)
My cv has a similar exchanging pieces protocol. But it is possible to exchange only pieces of the same type: rook with rook, bishop with bishop, and so on. And, this is important, the exchange is automatic (without interaction with the players) at the end of the turn. Can someone help me to implement this mechanism? How Hostage zillions file can be modified in this way?
Doa Vo, thanks for the reply. With "automatic exchange" I mean: "At the end of the turn, if a player has in his prison a type of piece already present in the opponent's prison (rook and rook; bishop and bishop; guard and guard; or queen and queen), the prisoners' exchange is mandatory: the white piece in the black prison is moved to the white reserve, the black piece in the white prison is moved to the black reserve." This process is mandatory at the end of the turn, so I would like that a dummy player could do that. That is, the players don't exchange the hostages, the AI do that for them. Sorry for my English. :-)
What if pawns, although military weak men, were rich merchants? Of course, they would have a lot of money with them, so they would be a delicious booty.
This is the thematic justification for the following modification of the original chess rule: if possible, it is mandatory to capture an enemy pawn.
This little rule alters the gameplay deeply. Each move is more important and has much more consequences. The game is more positional and players are more pushed to look ahead.
You can download the zillions file here: PawnTrap.
All rules of Orthodox Chess (FIDE Chess) apply, but with the following modifications:
1. if possible, it is mandatory to capture an enemy Pawn;
2. Bishops, rooks and queen can move just up to 3 squares;
3. stalemate is a loss for the stalemated opponent.
Let me know your feedbacks please. :-)
EDIT: name and rules updated [06DIC2012]
Hi Alfred, thanks for trying PawnX. Yes this is what I expected, consistent with the rules. After Bh6, the white knight should capture Pf7 or Ph7 but he can't, otherwise the white king would be in check. So white is in stalemate, losing the game. In all my tests (AI vs. AI) the games never ended in so few moves. Moreover, games usually end with a checkmate. What thinking time did you set for the AI? In PawnX, AI has to look ahead more so it needs more thinking time. Did you do other tests? How did they go? P.S. For now, I have noticed is a losing strategy to develop non-pawn too early in the game. You should move more pawns in the opening, setting traps for the enemy. Yes, I see pawns as traps.
I'm implementing a variant with bishops, rooks and queen move up to 4 squares. I think this will be better because decrease the "pawn appeal" factor. I will let you know how it goes. Anyway, I need a little help with zillion programming. How can I implement the rule "if the king is attacked ..." before a move of a non-king piece?
Hi Winther, >>>If you want to know whether your king is threatened, you'll have to search out where it is, and then check this square with the "attacked?" command. Yes, I need to know where the king is, but I don't know how to do that. Could you please explain it to me more in detail? I need this piece of code because I want to change my first rule in this one: 1. if possible and if the king is not in check, it is mandatory to capture an enemy pawn Thanks.
![A game information page](/index/game.gif)
Doa Vo, I have studied but unfortunately I cannot implement my function.
In technical terms what I need to do is this:
1. looping in prison-white-zone and in prison-black-zone
2. if in prison-white-zone there is a piece matching the type of a piece in prison-black-zone, then those pieces move to a certain zone
3. the loop ends when all prison-white-zone is scanned
I'm stuck so I really need help. :-)
In technical terms what I need to do is this:
1. looping in prison-white-zone and in prison-black-zone
2. if in prison-white-zone there is a piece matching the type of a piece in prison-black-zone, then those pieces move to a certain zone
3. the loop ends when all prison-white-zone is scanned
I'm stuck so I really need help. :-)
**M. Winther wrote:** Zillions forces you to make a move that protects the king, and you cannot make another move. So it is easy to enforce the rule that an enemy pawn must be captured. Simply add another "move-type" in every piece definition. This move type is exactly the same as the normal move-type except that (1) it is set to higher priority (2) you must verify before the move is executed that an enemy pawn is captured: "(verify enemy?)(verify (piece? Pawn))". This will enforce the capture of an enemy pawn provided that the king is not in check. It will still enforce the capture of a pawn if the king is protected thereby. *** I have done this procedure, as you can see in the zillions file I have posted in the first post of this discussion. I have a higher priority move-type, called “tasty-movesâ€, for each piece that check if it is possible to capture a pawn. If this is not possible , then you can make “normal†moves. But there is a problem, a big problem. If the king is in check and you can capture a pawn, for Zillions’ AI the only possible moves are those in which you capture a pawn, but with those moves you cannot get the king out of check, so it is checkmate. Not what I want. There is another problem. The situation is that a knight is protecting a king from an enemy bishop: white has Ke1, Nd2; black has Bb4. But there is an enemy pawn in e4, so the knight can capture it. Now, I want that the knight doesn’t move because if it do so, the king would be in check. But for Zillions’ AI there is no possible move, so it is stalemate. Not what I want. Any ideas? p.s. I sent you an e-mail.
Hi M. Winther,
>>>It is generally recommended for newcomers to Zillions programming to begin with a simpler game.<<<
I know, but I cannot limit my imagination. :-)
>>>I suppose, the simplest way to solve this is to introduce yet another move-type which has the highest priority of all.<<<
I think it is enough just two type of move: normal and "tasty". In the tasty moves, with higher priority, you verify (KING-NOT-IN-CHECK AND IT-IS-POSSIBLE-TO-CAPTURE-A-PAWN).
>>>So you must loop through the board squares until you find the friendly king, and verify that it is threatened.<<<
I'm having big trouble here. I wrote:
The idea behind is: a scan all the board and if any king is in check it is moved a marker in the dummy square named "king-check". I use "capture king-check" to clean the dummy square. (Assume I already defined all the links with "next", starting from the dummy square START.)
The problem is this piece of code doesn't work. What am I doing wrong?
>>>It is generally recommended for newcomers to Zillions programming to begin with a simpler game.<<<
I know, but I cannot limit my imagination. :-)
>>>I suppose, the simplest way to solve this is to introduce yet another move-type which has the highest priority of all.<<<
I think it is enough just two type of move: normal and "tasty". In the tasty moves, with higher priority, you verify (KING-NOT-IN-CHECK AND IT-IS-POSSIBLE-TO-CAPTURE-A-PAWN).
>>>So you must loop through the board squares until you find the friendly king, and verify that it is threatened.<<<
I'm having big trouble here. I wrote:
(piece
(name Controller)
(dummy)
(moves
(
capture king-check
START next
(while on-board?
(if (and attacked? (piece? King))
(create Marker king-check) )
next
)
add
)
)
)
The idea behind is: a scan all the board and if any king is in check it is moved a marker in the dummy square named "king-check". I use "capture king-check" to clean the dummy square. (Assume I already defined all the links with "next", starting from the dummy square START.)
The problem is this piece of code doesn't work. What am I doing wrong?
25 comments displayed
Permalink to the exact comments currently displayed.