Programming challenge

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Programming challenge

Post by Zach Wegner »

Looking through the archives, I found this old thread:
http://www.stmintz.com/ccc/index.php?id=413274

I thought it might be nice to have some more of these little contests in this group, since it seems rather slow lately.

So here's some proposed rules:
One week for contest entries.
All programs must be in ANSI C.
I don't know how to judge-maybe there should be different categories like smallest source code, most readable, etc. I think smallest source code would be most interesting (and least subjective).

And here's a proposed first contest:
Write the smallest program to *calculate* perft 6 from the starting position.

Comments welcome. Entries valid for exactly one week, e.g. before Nov. 9 at 7:24 my time.
mageofmaple

Re: Programming challenge

Post by mageofmaple »

A lot of people already have appropriate code for this, or could get very close from open-source material. How about a perft 6 for the 10x8 Capablanca's Chess array? That would require some more ingenituity. Additionally, the results would be more useful, as it would explore an area that hasn't been throughly researched already ...
If the idea is accepted, though, I would suggest fastest ANSI C code, and a somewhat longer time limit.
YL84

Re: Programming challenge

Post by YL84 »

hi,
nice idea, but if you restrict it to C language I could not participate :cry:
yves
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Programming challenge

Post by hgm »

Zach Wegner wrote:And here's a proposed first contest:
Write the smallest program to *calculate* perft 6 from the starting position.
Can micro-Max participate? :lol:
friedeks

Re: Programming challenge

Post by friedeks »

Zach Wegner wrote: So here's some proposed rules:
One week for contest entries.
All programs must be in ANSI C.
I would suggest not to restrict the programming language.
Would be much more interesting...
User avatar
smrf
Posts: 484
Joined: Mon Mar 13, 2006 11:08 am
Location: Klein-Gerau, Germany

Re: Programming challenge

Post by smrf »

Challenges, which demand to publish serious parts of ones own work, are not interesting for me, sorry.

Reinhard.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: Programming challenge

Post by Zach Wegner »

mageofmaple wrote:A lot of people already have appropriate code for this, or could get very close from open-source material.
That's the reason the challenge is smallest code. Micro-max could be used, but it is already much too big. I think you could get this down to maybe 5-10 lines...

But you do bring up one important point: the work must be original, i.e. not copied from open source (unless you wrote the open source).

As to others' concern about the language: I'm not really sure what to do. Having code in different languages would greatly complicate the judging. We could of course add C++, but anything else would require us to throw out the smallest code rule, I think.

The fastest code rule is not interesting to me, at least for this challenge. That is because so many people already have highly optimized move generators.
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Programming challenge

Post by jshriver »

hgm wrote:
Zach Wegner wrote:And here's a proposed first contest:
Write the smallest program to *calculate* perft 6 from the starting position.
Can micro-Max participate? :lol:
lol if so you win :)
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Programming challenge

Post by jshriver »

I must have been away when this thread came about, but I really really like the idea.

Sometimes it's nice to break out of your normal routines and play a game, and writing a small program to do a modest task is fun.

Hope to see more like this,
Josh
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Programming challenge

Post by jshriver »

Is the thread mentioned accessible from CCC or is it from the days prior to phpBB2?

Anyway I tried the forth language example and received this error:

jshriver@DolphinBoy:~$ gforth knights.f

in file included from *the terminal*:0
knights.f:23: Undefined word
including color to move
^^^^^^^^^
Backtrace:
$B7998DC4 throw
$B79A47E8 no.extensions

Any tips?