Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Chess in PROLOG

1,067 views
Skip to first unread message

Hugo Jose Ferreira

unread,
Apr 5, 2001, 11:13:26 AM4/5/01
to
Hi!

I'm currently writting a chess program under PROLOG for a project
at university. However, I haven't found too much information in the web
so far. Mainly the program will be based in the usual Minimax algorithm
with alpha-beta cuts...

If someone can help me findind papers and other kind of information,
i would be pleased. Thanks.

(BTW, I will be using GNU-Prolog <under linux> for easy C/C++
integration
for the GUI. However, I've heard about Strawberry PROLOG whish has some
predicates for builind simple GUIs. Any idea of an interpreter with
similar functions BUT for linux ? Thanks...)


--
_ _ _ ______ ____ ____
_ __ _ _ _ __ Hugo Jose Ferreira (Bytter)
_____ _ _ _ ___ _ _ Computer Engineering Student
_____ _ _ _ _____ _ _ http://fe.up.pt/~ei98031

Faculty of Engineering - Porto's University - ACM Students Branch

Ralph Becket

unread,
Apr 5, 2001, 12:24:05 PM4/5/01
to
In article <3ACC8B96...@gmx.net>,

Hugo Jose Ferreira <byt...@gmx.net> wrote:
>Hi!
>
>I'm currently writting a chess program under PROLOG for a project
>at university.
> [...]

>(BTW, I will be using GNU-Prolog <under linux> for easy C/C++
>integration
>for the GUI.

The advice I always give my students is The GUI Is Not Important!
You'll have your work cut out with getting your program to play
chess; GUIs are notorious time sinks and little credit is given
for them, regardless of how pretty they are (the exceptions are
GUI specific projects, but this isn't one.)

Ralph
--
Ralph....@cl.cam.ac.uk http://www.cl.cam.ac.uk/users/rwab1

Hugo Jose Ferreira

unread,
Apr 5, 2001, 4:18:59 PM4/5/01
to
Ralph Becket wrote:
>
> In article <3ACC8B96...@gmx.net>,
> Hugo Jose Ferreira <byt...@gmx.net> wrote:
> >Hi!
> >
> >I'm currently writting a chess program under PROLOG for a project
> >at university.
> > [...]
> >(BTW, I will be using GNU-Prolog <under linux> for easy C/C++
> >integration
> >for the GUI.
>
> The advice I always give my students is The GUI Is Not Important!
> You'll have your work cut out with getting your program to play
> chess; GUIs are notorious time sinks and little credit is given
> for them, regardless of how pretty they are (the exceptions are
> GUI specific projects, but this isn't one.)

Yes, it's true, that's why I would like to have a PROLOG implementation
that gives away simple predicates to create a simple GUI! This would
give me more time to spend on the real implementation of the chess
engine... Anyway, about the engine itself? Any help? :)

Jan Wielemaker

unread,
Apr 6, 2001, 3:53:51 AM4/6/01
to
On Thu, 05 Apr 2001 21:18:59 +0100, Hugo Jose Ferreira <byt...@gmx.net> wrote:
>Ralph Becket wrote:
>>
>> In article <3ACC8B96...@gmx.net>,
>> Hugo Jose Ferreira <byt...@gmx.net> wrote:
>> >Hi!
>> >
>> >I'm currently writting a chess program under PROLOG for a project
>> >at university.
>> > [...]
>> >(BTW, I will be using GNU-Prolog <under linux> for easy C/C++
>> >integration
>> >for the GUI.
>>
>> The advice I always give my students is The GUI Is Not Important!
>> You'll have your work cut out with getting your program to play
>> chess; GUIs are notorious time sinks and little credit is given
>> for them, regardless of how pretty they are (the exceptions are
>> GUI specific projects, but this isn't one.)
>
>Yes, it's true, that's why I would like to have a PROLOG implementation
>that gives away simple predicates to create a simple GUI! This would
>give me more time to spend on the real implementation of the chess
>engine... Anyway, about the engine itself? Any help? :)

If you download SWI-Prolog 4.0(.2), including the XPCE graphics package,
you'll find chess.pl in the demo programs. It is a *very* old XPCE
example program demonstrating how to build a GUI interface for a
commandline program, in this case traditional Unix chess. In the light
of the current status of XPCE/Prolog it uses very ugly techniques, but
it does provide the routines to create a chess-board in a window and move
pieces by the user as well as under program control.

I've verified it still works, which it did. Traditional Unix chess however
has died away, so I adapted it for GNU-chess. You find the patched version
on (one line, but news won't accept that).

http://gollem.swi.psy.uva.nl/cgi-bin/pl-cvsweb/pl/packages/
xpce/prolog/demo/chess.pl

The whole demo should run nicely on any machine with gnuchess installed,
probably even on Windows. The interface should definitely be ok on both
Unix and Windows.

Cheers --- Jan

Nicholas Geovanis

unread,
Apr 12, 2001, 7:03:28 PM4/12/01
to
On Thu, 5 Apr 2001, Hugo Jose Ferreira wrote:

> Hi!
>
> I'm currently writting a chess program under PROLOG for a project
> at university. However, I haven't found too much information in the web
> so far. Mainly the program will be based in the usual Minimax algorithm
> with alpha-beta cuts...
>
> If someone can help me findind papers and other kind of information,
> i would be pleased. Thanks.

The "Bratko Book" has some examples on chess problem-solving, on which the
author has published work. References are available in the text. There is
now a third edition, but I have the second edition:

Prolog Programming for Artificial Intelligence
by Ivan Bratko
3rd edition, Addison-Wesley Pub Co., ISBN 0201403757


> _ __ _ _ _ __ Hugo Jose Ferreira (Bytter)

* Nick Geovanis
| IT Computing Svcs
| Northwestern Univ
| n-geo...@nwu.edu
+------------------->

0 new messages