Queen and pawnless random chess Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » New Games for Zillions » Queen and pawnless random chess « Previous Next »

Author Message
Gunananda (Gunaji)
Posted on Friday, October 27, 2006 - 4:18 pm:   

the basic idea
every player has seven pieces
(king,2 bishops,2 rooks,2 knights)

and turn after he puts one piece on the chess board,
so that the piece placed can not kill another
piece when it's on turn

the king being placed last

after the last piece is being placed
the game continues according to the normal
chess rules
Greg Schmidt (Gschmidt)
Posted on Friday, October 27, 2006 - 8:51 pm:   

Seems like an interesting variation to me. Go for it!

-- Greg
Gunananda (Gunaji)
Posted on Monday, October 30, 2006 - 3:47 am:   

here's what i have implemented so far;
however it's not a random chess, because
i do not know how i can make this that turn after
turn one player can put a piece on the board

so i used a fixed starting position

; *** Chess
; *** Copyright 1998-2002 Zillions Development
; v.2.0

; You need to purchase Zillions of Games to load this rules file
; Visit the Zillions web site at http://www.zillions-of-games.com

(version "2.0")

(define leap1 ($1 (verify not-friend?) add) )
(define leap2 ($1 $2 (verify not-friend?) add) )
(define king-shift ($1 (verify not-friend?) (set-attribute never-moved? false) add) )

(define slide ($1 (while empty? add $1) (verify not-friend?) add))
(define rook-slide (
$1
(while empty? (set-attribute never-moved? false) add $1)
(verify not-friend?)
(set-attribute never-moved? false)
add
))

(define O-O
( (verify never-moved?)
e ; KB1
(verify empty?)
e ; KN1
(verify empty?)
cascade
e ; KR1
(verify (and friend? (piece? Rook) never-moved?) )
from
back ; K1
; Save expensive not-attacked?s for last
(verify not-attacked?)
e ; KB1
(verify not-attacked?)
to
(set-attribute never-moved? false)
; We could check if KN1 is attacked too, but this isn't
; really necessary since Zillions doesn't allow any moves
; into check
e ; KN1
(set-attribute never-moved? false)
add
)
)

(define O-O-O
( (verify never-moved?)
w ; Q1
(verify empty?)
w ; QB1
(verify empty?)
cascade
w ; QN1
(verify empty?)
w ; QR1
(verify (and friend? (piece? Rook) never-moved?) )
from
back ; K1
; Save expensive not-attacked?s for last
(verify not-attacked?)
w ; Q1
(verify not-attacked?)
to
(set-attribute never-moved? false)
; We could check if KN1 is attacked too, but this isn't
; really necessary since Zillions doesn't allow any moves
; into check
w ; QB1
(set-attribute never-moved? false)
add
)
)
(define En-Passant
(
$1
(verify enemy?)
(verify last-to?)
(verify (piece? Pawn))
capture
n
to
n
(verify last-from?)
add
)
)

(define Board-Definitions
(image "images\Chess\SHaag\Chess8x8.bmp" "images\Chess\Chess8x8.bmp")
(grid
(start-rectangle 5 5 53 53)
(dimensions
("a/b/c/d/e/f/g/h" (49 0)) ; files
("8/7/6/5/4/3/2/1" (0 49)) ; ranks
)
(directions (n 0 -1) (e 1 0) (s 0 1) (w -1 0)
(ne 1 -1) (nw -1 -1) (se 1 1) (sw -1 1)
)
)
(symmetry Black (n s)(s n) (nw sw)(sw nw) (ne se)(se ne))
(zone
(name promotion-zone)
(players White)
(positions a8 b8 c8 d8 e8 f8 g8 h8)
)
(zone
(name promotion-zone)
(players Black)
(positions a1 b1 c1 d1 e1 f1 g1 h1)
)
(zone
(name third-rank)
(players White)
(positions a3 b3 c3 d3 e3 f3 g3 h3)
)
(zone
(name third-rank)
(players Black)
(positions a6 b6 c6 d6 e6 f6 g6 h6)
)
)

(game
(title "Chess")
(description "Object: Checkmate the opponent's King by attacking
it so it cannot escape. To see a description of how a piece moves
right-click on it to bring up its properties dialog.\
Try playing one of the many exciting variants.")
(history "just an idea of some austrian in the autumn of 2006.")
(option "prevent flipping" 2)
(win-sound "Audio\Orchestra_CF.wav")
(loss-sound "Audio\Orchestra_FC.wav")
(click-sound "Audio\Pickup.wav")
(release-sound "Audio\WoodThunk.wav")
(players White Black)
(turn-order White Black)
(board (Board-Definitions))

(board-setup
(White
(Knight b1 g1)
(Bishop c1 f1)
(Rook a1 a2)
(King e1)
)
(Black
(Knight b8 g8)
(Bishop c8 f8)
(Rook h7 h8)
(King e8)
)
)


(piece
(name Knight)
(help "Knight: moves like an `L`, 2 squares one way and one the other")
(description "Knight\A Knight moves like an `L`, two squares vertically plus one
horizontally, or two squares horizontally plus one vertically. It
hops over any pieces on the way.")
(image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
(moves
(leap2 n ne)
(leap2 n nw)
(leap2 s se)
(leap2 s sw)
(leap2 e ne)
(leap2 e se)
(leap2 w nw)
(leap2 w sw)
)
)

(piece
(name Bishop)
(help "Bishop: slides diagonally any number of squares")
(description "Bishop\A Bishop moves any number of squares on a diagonal. It may
not leap over other pieces.")
(image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp"
Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp")
(moves
(slide ne)
(slide nw)
(slide se)
(slide sw)
)
)

(piece
(name Rook)
(help "Rook: slides any number of squares along the row or column.")
(description "Rook\A Rook moves any number of squares orthogonally on a rank
or a file. It may not leap over other pieces.")
(image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp"
Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp")
(attribute never-moved? true)
(moves
(rook-slide n)
(rook-slide e)
(rook-slide s)
(rook-slide w)
)
)


(piece
(name King)
(help "King: steps 1 square in any direction to a safe square")
(description "King\A King can move to any adjacent square, but never to a
square where it can be captured. It may also `castle`
with the Rook if neither the Rook nor King has moved yet and there is
nothing in between them. In castling the King moves two squares nearer
the Rook and the Rook leaps to the far side of the King. You may not
castle out of or through check, or if the King or Rook involved has
previously moved.")
(image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
(attribute never-moved? true)
(moves
(king-shift n)
(king-shift e)
(king-shift s)
(king-shift w)
(king-shift ne)
(king-shift nw)
(king-shift se)
(king-shift sw)
(O-O)
(O-O-O)
)
)

(loss-condition (White Black) (checkmated King) )
)


;(define leap1-capture ($1 (verify enemy?) add) )
;(define leap1-move ($1 (verify empty?) add) )
(define leap2-capture ($1 $2 (verify enemy?) add) )
(define leap2-move ($1 $2 (verify empty?) add) )

(define king-shift-capture ($1 (verify enemy?) (set-attribute never-moved? false) add) )
(define king-shift-move ($1 (verify empty?) (set-attribute never-moved? false) add) )

(define slide-capture ($1 (while empty? $1) (verify enemy?) add) )
(define slide-move ($1 (while empty? add $1)) )
(define rook-slide-capture ($1 (while empty? $1) (verify enemy?) (set-attribute never-moved? false) add) )
(define rook-slide-move ($1 (while empty? (set-attribute never-moved? false) add $1)) )
Karl Scherer (Karl)
Posted on Monday, October 30, 2006 - 7:05 pm:   

"i do not know how i can make this that turn after turn one player can put a piece on the board"

there are several ways to do this:
You can have special moves (belonging to special move-types) which come before the REPEAT command in the turn order.
Or you give the drops a 'move-priority' over the
other moves (see description of 'move-priorities' command).
Or you create an off-board position with a special dummy piece on it which indicates which operational mode is currently active.
In your move macro you then cheque whether this special position carries the indicator or not.

Cheers, Karl
Gunananda (Gunaji)
Posted on Monday, November 13, 2006 - 7:53 am:   

thanks Karl;
i adopted some things from the arima source code;
however the thing does not seem to work and i don't know why; if you would like to see the code

(version "0.0")

(define leap1 ($1 (verify not-friend?) add) )
(define leap2 ($1 $2 (verify not-friend?) add) )
(define king-shift ($1 (verify not-friend?) (set-attribute never-moved? false) add) )

(define slide ($1 (while empty? add $1) (verify not-friend?) add))
(define rook-slide (
$1
(while empty? (set-attribute never-moved? false) add $1)
(verify not-friend?)
(set-attribute never-moved? false)
add
))

(define drop-moves
(
pzone
(verify (piece? null))
add
)
)

(game
(title "Chess")
(description "Object: Checkmate the opponent's King by attacking
it so it cannot escape. To see a description of how a piece moves
right-click on it to bring up its properties dialog.\
Try playing one of the many exciting variants.")
(history "just an idea of some austrian in the autumn of 2006.")
(option "prevent flipping" 2)
(win-sound "Audio\Orchestra_CF.wav")
(loss-sound "Audio\Orchestra_FC.wav")
(click-sound "Audio\Pickup.wav")
(release-sound "Audio\WoodThunk.wav")

(board
(image "images\Chess\SHaag\Chess8x8.bmp" "images\Chess\Chess8x8.bmp")
(grid
(start-rectangle 5 5 53 53)
(dimensions
("a/b/c/d/e/f/g/h" (49 0)) ; files
("8/7/6/5/4/3/2/1" (0 49)) ; ranks
)
(directions (n 0 -1) (e 1 0) (s 0 1) (w -1 0)
(ne 1 -1) (nw -1 -1) (se 1 1) (sw -1 1)
)
)
(symmetry Black (n s)(s n) (nw sw)(sw nw) (ne se)(se ne))
(zone
(name pzone)
(players White Black)
(positions
a1 a2 a3 a4 a5 a6 a7 a8
b1 b2 b3 b4 b5 b6 b7 b8
c1 c2 c3 c4 c5 c6 c7 c8
d1 d2 d3 d4 d5 d6 d7 d8
e1 e2 e3 e4 e5 e6 e7 e8
f1 f2 f3 f4 f5 f6 f7 f8
g1 g2 g3 g4 g5 g6 g7 g8
h1 h2 h3 h4 h5 h6 h7 h8
)
)


)


(board-setup
(White
(Knight off 2)
(Bishop off 2)
(Rook off 2)
(King off 1)
)
(Black
(Knight off 2)
(Bishop off 2)
(Rook off 2)
(King off 1)
)
)
(players White Black)
(turn-order
(Black dropping)(White dropping)(Black dropping)(White dropping)
(Black dropping)(White dropping)(Black dropping)(White dropping)
(Black dropping)(White dropping)(Black dropping)(White dropping)
(Black dropping)(White dropping)
repeat (Black normal) (White normal)
)


(piece
(name Knight)
(help "Knight: moves like an `L`, 2 squares one way and one the other")
(description "Knight\A Knight moves like an `L`, two squares vertically plus one
horizontally, or two squares horizontally plus one vertically. It
hops over any pieces on the way.")
(image White "images\Chess\SHaag\wknight.bmp" "images\Chess\wknight.bmp"
Black "images\Chess\SHaag\bknight.bmp" "images\Chess\bknight.bmp")
(moves
(move-type normal)

(leap2 n ne)
(leap2 n nw)
(leap2 s se)
(leap2 s sw)
(leap2 e ne)
(leap2 e se)
(leap2 w nw)
(leap2 w sw)
)
(drops
(move-type dropping)
(drop-moves)

)
)

(piece
(name Bishop)
(help "Bishop: slides diagonally any number of squares")
(description "Bishop\A Bishop moves any number of squares on a diagonal. It may
not leap over other pieces.")
(image White "images\Chess\SHaag\wbishop.bmp" "images\Chess\wbishop.bmp"
Black "images\Chess\SHaag\bbishop.bmp" "images\Chess\bbishop.bmp")
(moves
(move-type normal)
(slide ne)
(slide nw)
(slide se)
(slide sw)
)
(drops
(move-type dropping)
(drop-moves)
)
)

(piece
(name Rook)
(help "Rook: slides any number of squares along the row or column.")
(description "Rook\A Rook moves any number of squares orthogonally on a rank
or a file. It may not leap over other pieces.")
(image White "images\Chess\SHaag\wrook.bmp" "images\Chess\wrook.bmp"
Black "images\Chess\SHaag\brook.bmp" "images\Chess\brook.bmp")
(attribute never-moved? true)
(moves
(move-type normal)
(rook-slide n)
(rook-slide e)
(rook-slide s)
(rook-slide w)
)
(drops
(move-type dropping)
(drop-moves)
)
)


(piece
(name King)
(help "King: steps 1 square in any direction to a safe square")
(description "King\A King can move to any adjacent square, but never to a
square where it can be captured. It may also `castle`
with the Rook if neither the Rook nor King has moved yet and there is
nothing in between them. In castling the King moves two squares nearer
the Rook and the Rook leaps to the far side of the King. You may not
castle out of or through check, or if the King or Rook involved has
previously moved.")
(image White "images\Chess\SHaag\wking.bmp" "images\Chess\wking.bmp"
Black "images\Chess\SHaag\bking.bmp" "images\Chess\bking.bmp")
(attribute never-moved? true)
(moves
(move-type normal)
(king-shift n)
(king-shift e)
(king-shift s)
(king-shift w)
(king-shift ne)
(king-shift nw)
(king-shift se)
(king-shift sw)
(drops
(move-type dropping)
(drop-moves)
)
)

(loss-condition (White Black) (checkmated King) )
)


;(define leap1-capture ($1 (verify enemy?) add) )
;(define leap1-move ($1 (verify empty?) add) )
(define leap2-capture ($1 $2 (verify enemy?) add) )
(define leap2-move ($1 $2 (verify empty?) add) )

(define king-shift-capture ($1 (verify enemy?) (set-attribute never-moved? false) add) )
(define king-shift-move ($1 (verify empty?) (set-attribute never-moved? false) add) )

(define slide-capture ($1 (while empty? $1) (verify enemy?) add) )
(define slide-move ($1 (while empty? add $1)) )
(define rook-slide-capture ($1 (while empty? $1) (verify enemy?) (set-attribute never-moved? false) add) )
(define rook-slide-move ($1 (while empty? (set-attribute never-moved? false) add $1)) )
Karl Scherer (Karl)
Posted on Tuesday, November 14, 2006 - 10:43 pm:   

You did not define "null", but you code:
(verify (piece? null))

I assume that should be
(verify empty?)

If you have more problems, you better send me the files.
Cheers, Karl
Gunananda (Gunaji)
Posted on Wednesday, November 15, 2006 - 9:11 am:   

i would like to mention that alfred pfeiffer from east germany has removed the errors from the script
and made it a running program.
however i'm still thinking about how to restrict the
dropping rules, because they result as i expected in
a checkmate before the game started.
Gunananda (Gunaji)
Posted on Wednesday, November 15, 2006 - 3:42 pm:   

I think the error that something like a checkmate
before playing can happen comes due to the fact
that one can choose the order of how to drop the
pieces on the board.
I changed this already by giving it a fixed order.
first the rooks are dropped, then the bishops,
the knights and then the kings.
Is there a need for more restricitons to make it
a good game ?

Here are the code changes:
(turn-order
(Black rook-dropping)(White rook-dropping)(Black rook-dropping)(White rook-dropping)
(Black bishop-dropping)(White bishop-dropping)(Black bishop-dropping)(White bishop-dropping)
(Black knight-dropping)(White knight-dropping)(Black knight-dropping)(White knight-dropping)
(Black king-dropping)(White king-dropping)
repeat (Black normal) (White normal)
)


the normal
(drops
(move-type dropping)
(drop-moves)
)

is replaced with

(move-type rook-dropping)
and so on
Karl Scherer (Karl)
Posted on Thursday, November 16, 2006 - 2:12 pm:   

There is absolutely no need for a fixed order at all.

Create a dummy piece 'Counter' at a one-dimensional grid (z1,...z16) of 16 positions with each drop:

z1 (while empty? n) (create Counter)

Include in the loss-condition the condition that z16 (if you drop eight pieces each)is not empty:

(loss-condition (White Black)
(and
(checkmated King)
(absolute-config (any-owner Counter) z16)
)
)

Cheers, Karl

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: