Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old August 28th 03, 08:22 AM
abi
 
Posts: n/a
Default checkmate analysis

i am writing an graphical user interface for chess using OpenGl. I
need to also validate the moves of the players as the interface should
be usable across a network.

The problem arises when i try to identify the cases when a checkmate
or a stalemate position. i have no better idea than computing all
possible next moves and finding that they are invalid. This is a too
big a task to perform after every move.

on the other hand giving the user an option to claim checkmate or
draw seems too naive. Is there a better algorithm to find this out.

thanks for anything from pointers to code ( in C or C++)
  #2   Report Post  
Old August 28th 03, 10:37 PM
Dieter Buerssner
 
Posts: n/a
Default checkmate analysis

abi wrote:

i am writing an graphical user interface for chess using OpenGl. I
need to also validate the moves of the players as the interface should
be usable across a network.

The problem arises when i try to identify the cases when a checkmate
or a stalemate position. i have no better idea than computing all
possible next moves and finding that they are invalid.


Yes, there is probably no other efficient and easy to implement way.

This is a too
big a task to perform after every move.


Why? It should take only some microseconds for each move, probably much
less than needed to redraw the board, or whatever else you do in you GUI.
But it needs almost a chess-engine, to verify - sure. You'll need a move-
generator, an "Incheck" routine, and a one ply search. But it won't take
long.

Regards,
Dieter
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017