473,856 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python & chess

Well Python is not a good language for writing a chess engine (even if
a chess engine exists:
http://www.kolumbus.fi/jyrki.alakuijala/pychess.html), but it could be
grat for chess interfaces, for drawing boards, and similar things. I
foudn out a library for these things
(http://www.alcyone.com/software/chess/). Does anyone konw about more
chess related modules?

Thnx
PAolo
Aug 24 '06 #1
5 6924
Paolo Pantaleo wrote:
Well Python is not a good language for writing a chess engine
I'm curious; how does python fall short here, and what are the
features that make some other language more suitable for the
task?

Toby

--
Posted via a free Usenet account from http://www.teranews.com

Aug 24 '06 #2
Paolo Pantaleo wrote:
Well Python is not a good language for writing a chess engine (even if
a chess engine exists:
http://www.kolumbus.fi/jyrki.alakuijala/pychess.html), but it could be
grat for chess interfaces, for drawing boards, and similar things. I
foudn out a library for these things
(http://www.alcyone.com/software/chess/). Does anyone konw about more
chess related modules?
I have written a chess module that may be of use to you.

http://www.willmcgugan.com/2006/06/18/chesspy/
Will McGugan
--
work: http://www.kelpiesoft.com
blog: http://www.willmcgugan.com
Aug 24 '06 #3
tobiah írta:
Paolo Pantaleo wrote:
>Well Python is not a good language for writing a chess engine

I'm curious; how does python fall short here, and what are the
features that make some other language more suitable for the
task?
Hmmm. I think that if you need to write a very clever chess game, then
you need to use very fast routines, written in C or even assembly. I
have heard that the best chess programs use a database. That database
contains hundreds of thousands of games played previously by famous
chess players. Usually they play the first few steps by using this
database (and not using any AI).

Do you plan to beat "Chessmaste r"? :-) If you only want to try your AI
abilities, then Python is ideal for the task. At least this is my opinion.

Laszlo

Aug 24 '06 #4
Hmmm. I think that if you need to write a very clever chess game, then
you need to use very fast routines, written in C or even assembly.
Oh, right. Speed. I thought that you were talking about
some mismatch of capabilities.

Toby

--
Posted via a free Usenet account from http://www.teranews.com

Aug 24 '06 #5
Will McGugan wrote:
>
I have written a chess module that may be of use to you.

http://www.willmcgugan.com/2006/06/18/chesspy/
See also ChessBoard - a nice implementation of chess using pygame:

http://www.pygame.org/projects/9/282/

Paul

Aug 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
3442
by: Max M | last post by:
There is a story today on Slashdot Open Source Project Management Lessons ====================================== http://developers.slashdot.org/article.pl?sid=03/07/02/1817220&mode=flat&tid=185 "Paul Baranowski takes a moment to reflect on Open Source Project Management in his blog. His reflections are based on the first two years of the Peek-a-booty project." Interesting comments on media coverage,
46
3017
by: tnozh | last post by:
Hi, I am blessed with a *very* gifted nine-years old daughter for whom I have recently installed an old GNU/Linux Mandrake 7.2 on an equally old Pentium Pro box. She is enjoying it tremendously and has no problems understanding simple desktop operations and the file system basics (Needless to say - she has already mastered the 30 or so games I installed for her). Now, I would like to teach her programming basics using Python (because
2
1234
by: Adelson Anton | last post by:
Greetings fellow coders. Please check this page for a code which rearranges chess cells: http://s95005072.onlinehome.us/blog/Chess/chess.htm There are 2 problems: 1. It takes quite a bit for the function to run each time. I don't know how to speed it up further. 2. The function runs twice on mozilla browsers for some reason. Any help is greatly appreciated. And hold your flames, this is my first
5
3769
by: Will McGugan | last post by:
Hi folks, I've written a Python chess module that does the following. * Reads / Writes PGN files * Write FEN files * Validates moves * Lists legal moves * Detects check / mate / stalemate / 50 move rule / threefold repetition
105
5386
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does not work. It only works on lists and strings, for no obvious reason. Why not on all sequence types? Or, another example, the index() method has start and end parameters for lists and strings. The count() method also has start and end parameters...
53
3473
by: Krystian | last post by:
Hi are there any future perspectives for Python to be as fast as java? i would like to use Python as a language for writing games. best regards krystian
1
2501
by: Varun Hiremath | last post by:
Hello, I have written a chess client using python which is a graphic interface to play chess. It is at present a two player version, players move their peices by clicking two squares on the board as in any other chess clients. Now i want to interface my program with the already available gnuchess program. Basically i want to feed the user input to the gnuchess and get the output and then display in my GUI. I have read about Popen but i...
63
15295
by: biyubi | last post by:
Hi, a year ago I won the 2005 Best Game categoryof the International Obfuscated C Code Contestwith a chess program. http://www.ioccc.org/whowon2005.html http://www.mailcom.com/ioccc/toledo/hint.htmBut this post is because I have discovered (asurprise for me) that it is also the worldsmallest chess program written in C language.It has a size of 3004 bytes, or 2261 bytes simplydeleting all the spacing that makes the knightfigure, cutting...
39
2900
by: cm_gui | last post by:
Python is slow. Almost all of the web applications written in Python are slow. Zope/Plone is slow, sloow, so very slooow. Even Google Apps is not faster. Neither is Youtube. Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster than Python. Okay, they probably use caching or some code compilation -- but Google Apps and those Zope sites probably also use caching. I've yet to see a web application written in...
0
9922
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9766
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11066
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9536
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7934
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7098
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5962
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4584
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.