Upcoming features in Knights

I haven’t been lazy since the last stable release of Knights. Three highly-awaited but not difficult features have made their way to feature branches and will be included in the next release.

Saving and loading the move history

Knights can now save a finished or in-progress game to a file using the PGN notation, so that users our other programs can load and analyze the game. Such files can also be opened, in which case the saved moves are replayed.

I am also planning to add a view of the game history, probably a simple list at first.

UCI protocol support

Many chess engines, most notably Stockfish, make use of the Universal Chess Interface. The basic operation of passing moves between the engine and the interface works, but I’m still working on other features (pretty much only draw offers).

Difficulty setting

Chess engines usually don’t have any explicit hard or easy modes, but you can limit their search depth. Having the computer only consider a small number of moves on advance makes its game weaker. It is also possible to reduce the size of the program’s memory hash, further reducing its strength.  Fortunately, both XBoard and UCI support this setting, so there is no need for differentiation.

Difficulty Settings in Knights

Try it

I decided that keeping a stable master and developing in feature branches is the easiest approach for me. So this work is still in branches ‘pgn’ and ‘uci’. I will merge them into master as soon as all translatable strings are fixed.

I would be especially happy for any testing and input regarding the difficulties (currently still in branch ‘uci’, will be merged real soon), are they too easy, too hard? Are they noticeable at all? I’m not a good player, so it’s hard for me to rate the skill of engines.

Update: I merged both branches into master.

Advertisements

18 responses to this post.

  1. Couldn’t you add an option to adjust the difficulty manually?

    Reply

    • Posted by noughmad on 25. October 2011 at 16:19

      I could, but considering that I don’t know exactly what depth corresponds to what difficulty, I can’t expect users to know it either.

      KGameDifficulty does support setting a custom level (like a custom board size in KMines), so adding the option (alongside some defined ones, of course) isn’t difficult. I’m more worried about the usability of such a setting.

      On the other hand, if you have enough knowledge of chess engines to know which depth and hashsize to choose, you can always use the provided console.

      Reply

      • Well, having some good pre defined difficulties is of course good, you should not expect the user to try it himself. But once there are good predefined levels everybody could also test intermediate difficulty settings. It would be a plus for everybody.

        Reply

  2. Posted by damian on 25. October 2011 at 21:39

    Reducing the difficulty would also reduce time to make moves. Right?
    My problem with knights is that the computer plays a lot slower than with gnome chess for example, is that because defaulted to a more difficult level?

    Reply

  3. computerprotocol.cpp is missing in your uci branch. 😉

    Reply

  4. Posted by asdsdf on 25. October 2011 at 23:26

    you’re the man 🙂

    +1 for manual settings, it should have at least 10steps of difficulty, 5steps is really no choice for casual players – hard and very hard won’t be playable for them, it’s nice to see your own progres, with only 5 steps, it’s hard to set enjoyable opponent and it’s hard to move to next level

    Reply

  5. Posted by Alberto on 26. October 2011 at 17:09

    Hi, I’ve tried it with critter 1.2 (which uses uci).
    – If I’m the black, the engine does the first move, then when I move Knights crashes
    – If I’m the white, I can move, but then the engine waits forever.

    In the console there are messages like:

    invalid move or command: xboard
    invalid move or command: depth
    invalid move or command: sd

    Thanks for any help

    Reply

    • Posted by noughmad on 26. October 2011 at 18:16

      Even though UCI (which Critter uses) is implemented, it’s still not used when you start a new game. That’s why it’s sends the ‘xboard’ command which is not recognized. This is something I will try to fix today.

      Still, Knights shouldn’t crash, if you have time, could you open a bug on http://bugs.kde.org and post the backtrace there? Or send me an email, blog comments are not the best tool for bug reports.

      Reply

  6. What about a better graphics and some sounds? I think that would make the game more decent.

    Reply

    • Posted by noughmad on 27. October 2011 at 17:38

      I’m a programmer, not a magician. If you know of some good chess graphics that could be included, please let me know, but I’m not going to draw or make music.

      Reply

    • I do not know what sounds should be good for. Play some music with Amarok… However, there are also some nice themes at KDE-Look, you can download them using KHNS from the settings dialog.

      Reply

  7. […] Upcoming features in Knights (noughmad.com) […]

    Reply

  8. Hi,
    this is a great app, I love it. Would it generally make sense or be difficult to add an option to automatically save and restore the last played game status to make knights more ‘activites’ aware?

    My usecase atm is that I’m on a trip and play with my girlfriend by sending each others moves via email or chat. I created an activity for it which when it opens comes up with knights, my chess book (don’t tell her .. :-)) and a telepathy chatwindow. Autosave and Restore would allow to quickly go in and out of this activity without further user interaction.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: