A Chess forum. ChessBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ChessBanter forum » Chess Newsgroups » rec.games.chess.computer (Computer Chess)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

checkmate analysis



 
 
Thread Tools Display Modes
  #1  
Old August 28th 03, 09:22 AM
abi
external usenet poster
 
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  
Old August 28th 03, 11:37 PM
Dieter Buerssner
external usenet poster
 
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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright 2004-2017 ChessBanter.
The comments are property of their posters.