How do I force cutechess-cli to play a specific EPD position

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 4:18 pm
Location: Austin, TX
Contact:

How do I force cutechess-cli to play a specific EPD position

Post by Tom Likens » Sun Sep 23, 2012 7:31 pm

I've been experimenting with cutechess-cli and I'm very impressed. One question I had though
was how to force it to play a specific EPD position? For example, I have a file with about 10,000
EPD positions and I'd like cutechess-cli to select a random position (let's say position #2934 as
an example). Unfortunately, I've been through the documentation and I can't seem to find this
option. Does it exist?

This would be useful for playing matches where the starting positions are random. Xboard supports
this, but I'm not sure that cutechess-cli does. It does support a randomization feature for opening
books, but not PGN or EPD files (at least as far as I can ascertain). One final comment, it would also
be good if this feature supported the "srand" argument in the same way that it is supported for the
opening book option.

Any help would be appreciated.

regards,
--tom

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by ilari » Sun Sep 23, 2012 9:10 pm

Tom Likens wrote:I've been experimenting with cutechess-cli and I'm very impressed. One question I had though
was how to force it to play a specific EPD position? For example, I have a file with about 10,000
EPD positions and I'd like cutechess-cli to select a random position (let's say position #2934 as
an example). Unfortunately, I've been through the documentation and I can't seem to find this
option. Does it exist?

This would be useful for playing matches where the starting positions are random. Xboard supports
this, but I'm not sure that cutechess-cli does. It does support a randomization feature for opening
books, but not PGN or EPD files (at least as far as I can ascertain). One final comment, it would also
be good if this feature supported the "srand" argument in the same way that it is supported for the
opening book option.

Any help would be appreciated.

regards,
--tom
The latest release of cutechess-cli doesn't understand EPD files. If you compile from source you'll get a version that has an "-epdin" option which works like "-pgnin", meaning that it will grab starting positions from the EPD file. And cutechess-cli doesn't have the ability to choose random starting positions from a PGN or EPD file, and it also can't start the match from the nth game in the file. It's a planned feature though.

For now I'm afraid you'll have to randomize the positions or games in the PGN or EPD file with some 3rd party tool.

Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 4:18 pm
Location: Austin, TX
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by Tom Likens » Sun Sep 23, 2012 9:36 pm

Thanks Ilari,

I've compiled it from the source already and have been using the "-epdin" option. It's nice to know
that the randomization and starting from the nth game in a file are planned EPD features. For now
I'll hack something else together, but keep watch on the mailing list.

BTW, I really want to compliment you and Arto Jonsson on the development of "cutechess-cli"
and its release into the wild. It's really a *very* useful tool.

regards,
--tom

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by ilari » Mon Sep 24, 2012 7:30 pm

Tom Likens wrote:Thanks Ilari,

I've compiled it from the source already and have been using the "-epdin" option. It's nice to know
that the randomization and starting from the nth game in a file are planned EPD features. For now
I'll hack something else together, but keep watch on the mailing list.
I'm pretty sure you'll see this feature in the next version of cutechess-cli. I already know how I'm going to do it in a way that is fast and doesn't use much memory.
BTW, I really want to compliment you and Arto Jonsson on the development of "cutechess-cli"
and its release into the wild. It's really a *very* useful tool.

regards,
--tom
Thanks for the kind words and thanks for testing our experimental tool. If you've been compiling cutechess-cli from source code, then surely you've also compiled the GUI. It's still in development and not even at an alpha stage, but if you're brave I recommend you to try it. The GUI is where most of my effort goes at the moment.

Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 4:18 pm
Location: Austin, TX
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by Tom Likens » Tue Sep 25, 2012 1:23 am

ilari wrote: Thanks for the kind words and thanks for testing our experimental tool. If you've been compiling cutechess-cli from source code, then surely you've also compiled the GUI. It's still in development and not even at an alpha stage, but if you're brave I recommend you to try it. The GUI is where most of my effort goes at the moment.
OK, I compiled it and fired it up. Very nice so far. One quick comment is that you should probably
add an "About" entry to the "Help" menu so that people know who to thank. I'll run some engine-
engine matches this week and give you a bit of feedback on things.

regards,
--tom

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by ilari » Wed Oct 03, 2012 7:21 pm

Hi again. Since you're compiling cutechess-cli from source code I thought I'd let you know that picking openings or starting positions in random order from both EPD and PGN files is now supported. The way it works is that cutechess-cli first indexes the whole file in a shuffled list and then picks the file positions of the games or EPD positions sequentially from that list. So if your EPD file has 10 games and you play 10 games, then each position in the file is picked once, but in random order. And if you play more than 10 games a new cycle starts where the openings are picked in the same order. In other words, the result is the same as shuffling the EPD file before the match, but without actually modifying it. Note that indexing will take a few seconds if you use a large PGN file (> 100 MB), but memory consumption is very low.

Is this what you were looking for?
OK, I compiled it and fired it up. Very nice so far. One quick comment is that you should probably
add an "About" entry to the "Help" menu so that people know who to thank. I'll run some engine-
engine matches this week and give you a bit of feedback on things.
Sure, there's going to be an About box, and a Preferences dialog, and many other features. Things are still very much unfinished so a lot of obvious stuff is missing. But we're working on it...

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 7:17 pm

Re: How do I force cutechess-cli to play a specific EPD posi

Post by mcostalba » Thu Oct 04, 2012 6:03 am

ilari wrote: Things are still very much unfinished so a lot of obvious stuff is missing. But we're working on it...
You are doing a great work. I routinely compile from sources and use it. IMHO now the only last big missing feature for the 'cli' is pondering support.

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by ilari » Thu Oct 04, 2012 10:35 am

mcostalba wrote:
ilari wrote: Things are still very much unfinished so a lot of obvious stuff is missing. But we're working on it...
You are doing a great work. I routinely compile from sources and use it. IMHO now the only last big missing feature for the 'cli' is pondering support.
Thanks. You're doing great with Stockfish as well, you seem to have a real community now at Github. Pondering is surprisingly one of the trickiest features to implement properly in the GUI, but it will be there sooner or later.

Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 4:18 pm
Location: Austin, TX
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by Tom Likens » Thu Oct 04, 2012 3:26 pm

ilari wrote:Hi again. Since you're compiling cutechess-cli from source code I thought I'd let you know that picking openings or starting positions in random order from both EPD and PGN files is now supported. The way it works is that cutechess-cli first indexes the whole file in a shuffled list and then picks the file positions of the games or EPD positions sequentially from that list. So if your EPD file has 10 games and you play 10 games, then each position in the file is picked once, but in random order. And if you play more than 10 games a new cycle starts where the openings are picked in the same order. In other words, the result is the same as shuffling the EPD file before the match, but without actually modifying it. Note that indexing will take a few seconds if you use a large PGN file (> 100 MB), but memory consumption is very low.

Is this what you were looking for?
OK, I compiled it and fired it up. Very nice so far. One quick comment is that you should probably
add an "About" entry to the "Help" menu so that people know who to thank. I'll run some engine-
engine matches this week and give you a bit of feedback on things.
Sure, there's going to be an About box, and a Preferences dialog, and many other features. Things are still very much unfinished so a lot of obvious stuff is missing. But we're working on it...
Ilari,

Yes, I think this is exactly the feature I was requesting. I'll try it out today. As for my comment
about the "About" box, please don't misunderstand, it wasn't criticism, I just want you and the
rest of the team to get credit for all your hard work. I've written a lot of software and I know
how much work it is, so you deserve all the kudo you can get.

I'm continually amazed by the high quality software that people release for free. I used Linux
almost exclusively and it's really unbelievable.

regards,
--tom

User avatar
ilari
Posts: 750
Joined: Mon Mar 27, 2006 5:45 pm
Location: Finland
Contact:

Re: How do I force cutechess-cli to play a specific EPD posi

Post by ilari » Thu Oct 04, 2012 9:54 pm

Tom Likens wrote:Yes, I think this is exactly the feature I was requesting. I'll try it out today. As for my comment
about the "About" box, please don't misunderstand, it wasn't criticism, I just want you and the
rest of the team to get credit for all your hard work. I've written a lot of software and I know
how much work it is, so you deserve all the kudo you can get.
No worries, I didn't take it as criticism. But criticism is very welcome as well - we need it and we listen to it. I've done enough interviews and prototype testing with focus groups to know that I can't always trust myself (ie. the developer) to make good design decisions.
I'm continually amazed by the high quality software that people release for free. I used Linux almost exclusively and it's really unbelievable.
Software developers usually enjoy what they're doing, so they do it also on their own time. I think it makes sense that free software is sometimes of higher quality than commercial software because for our own projects we don't have unrealistic deadlines to complete poorly defined tasks that eventually end up being stitched to an enterprisey software equivalent of the Frankenstein monster. If I was being paid a monthly salary by the Cute Chess Corporation, I'm not sure my boss would've appreciated the countless hours I spent optimizing the memory footprint of the game database or the speed of the internal board classes, or refactoring the threading code, etc.

Post Reply