beeline through tkinter (chess)

RPM1 rpm1deleteme at direcway.com
Sat Feb 14 08:22:21 EST 2004


"Lonnie Princehouse" <fnord at u.washington.edu> wrote in message
news:f70e3538.0402132003.1942b297 at posting.google.com...
> Yes, Python is probably too slow for a competitive chess engine.
> Pychess works, but it's about two orders of magnitude slower than it
> would be in C.  I haven't tried it with Psyco; that might help
> considerably.
>
> That said, it's a breeze to write C extensions for Python.  It makes a
> lot of sense to write the GUI in Python and have the crunchy bits in
> C.
>

Yeah but there are already GUI's, (Winboard and Arena), that you can
run various chess engines in.  That negates the need to write the GUI
part, so you're just left with the engine in C.

I've written move generators in Python, (with Psyco),  and they achieve
speeds around 10,000 - 20,000 nodes per second on a machine where
C code can do 300,000 - 500,000 nodes per second.  Java and C#
were around 80,000 - 120,000.

Of course the trick with Python is to *not* wrte a straight port of C code
but to use the built in functionality of Python to some kind of advantage.
I have not achieved that yet.

Patrick






More information about the Python-list mailing list