You can find some initial work on annotated pgn support (based on chessmonk) in
the old database hg brach. Unfortunately I was too few to implement variation
support into pychess core classes, but feel free to use/enhance it any
way you like.
Tamás
> --
> You received this message because you are subscribed to the Google Groups "PyChess People" group.
> To post to this group, send email to pychess...@googlegroups.com.
> To unsubscribe from this group, send email to pychess-peopl...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pychess-people?hl=en.
>
>
Sweet, I'll check out your work on the tracker.
> I have a few ideas, but in each case I'm unsure how to do the UI.
>
> * Endgame database support:
> It's in the issue tracker. It sounds like a bad engine feature
> (perfect late endgame play != fun ;) but in the GUI it could
> complement the opening book sidepanel nicely. It could display all the
> legal moves, whether they win/lose/draw, and (if the result is
> decisive) how many moves it would take. This feature is feasible
> thanks to Miguel Ballicora's Gaviota endgame tablebase library (MIT
> license).
> UI questions:
> Can anyone think of a sane way to use the same panel for opening and
> late endgame info? It's an attractive idea because the layout and
> response to clicks will be so similar, and the panels will never both
> be useful at once.
Actually I believe it is good to have some level of endgame table
support in the engine as well. The thing is that otherwise the engine
will play ridiculously bad. An engine that only thinks 5-6 moves ahead
isn't able to do anything, but move pieces in circles.
The key is afterwards implementing human like mistakes depending on
the skill level chosen.
But on the point, combining opening book and endgame table may be a
great idea. Currently the opening book panel is only wasting space,
once the first ten moves are played.
My idea would be changing it into a "Hint" panel. The hint panel would
draw moves from the book, from the hint engine, and from the endgame
table.
Hints from book or table, when available, would be shown before hints
from the engine, and marked or separated in some nice looking way.
> Will I have to worry about hiding this info for internet chess games?
> (I don't use PyChess with FICS, so I don't know whether it turns off
> any features to discourage cheating.)
We don't do any forcing of good moral.
I guess it is currently a bit too easy to cheat, but lets not worry
about it right now.
> * Annotation (PGN comment) support:
> This seems like a logical sidepanel to add: it would look like the
> current "comments" panel, but it would show the contents of PGN
> comments (if any). Once that's working, it would also be neat to make
> them editable. (I'm not sure whether I'd be able to code that; I don't
> know much about GTK.)
> UI questions:
> Should the user get any special cue upon opening a PGN file with
> comments? What about navigating to a position in the game where
> there's a comment?
> Should this be orthogonal to the existing comments panel?
> When comments are editable, what's the UI for adding a comment to a
> move? I'm thinking of having an extra comment box corresponding to the
> current move number. If you scroll past a comment... the box
> disappears when the comment gets highlighted. And then it reappears
> below that comment in the list.
I like mixing manual commenting into the comments panel. The fewer
panels the better.
The way I imagine it, would be having a comment box for every move.
Initially the moves are auto commented, or commented from a loaded pgn.
Double clicking them, or clicking a small edit icon, will let you
change the text.
Text entered by a human has another, more visible, color that the one
used by auto commenting.
However, to really use PyChess as a pgn viewer, we'd need support for
a game "tree", rather than just a list as we have now.
This is probably a bit more into the future, but perhaps Tamas has
some progress in the area.
Great to have you hacking,
Thomas Dybdahl Ahle
I've started with the opening: my PyChess branch uses the Polyglot book
format. This has some advantages: It can drop the sqlite dependency. It
can drop the book creation code, because Polyglot and SCID work better
and are also free software. It can use more complete books by other
authors -- for instance, SCID's books are 3-22 times as large.
(Those are copyrighted by their owners, but they would probably grant
permission to use them.)
I converted the old book using a utility (added in df508a112b, deleted
in cd1ba55c0c).
There's one problem: Polyglot books don't contain win/draw/loss data for
each move. They do have optional learning data; as a hack, I used that
to store the old W/D/L data from the old book. So my branch still
displays the bars and tooltips, but that won't work with other book
files.
I think it would be OK to replace these statistics with a percentage
(how often the computer would play each move). If the weight is very
small, maybe we can show the move in red (to mark it as a blunder). The
bars looked neat, but I don't think they were that useful -- the book
was built from too few games for the statistics to be meaningful. Any
thoughts?
Because this is a learning experience for me (in Python and DVCS) I'm
confining the damage to a clone of the repo. :)
I gave it a bad name because I didn't realize what I was doing. Anyway,
it's at http://code.google.com/r/uncombedcoconut-hints/ on the
openings-endgames branch.
One more thing: if I'm supposed to be updating the stuff under doc/ when
I change lib/, I'd like a pointer on how to do that. :)
Sounds great.
I don't know enough about hg to tell whether an hg clone is overkill.
Since you should (hopefully) only need to change stuff in the
sidepanels/ folder, perhaps a branch would have some advantages.
Tamás?
> I've started with the opening: my PyChess branch uses the Polyglot book
> format.
> ...
> There's one problem: Polyglot books don't contain win/draw/loss data for
> each move.
Polyglot sounds great. That should hopefully make it easier for people
to supply and test their own opening books.
A win percentage could be an acceptable replacement for win/draw/loss.
Especially if it is drawn with a bit of bling ;)
Generally we want to include all the data we have about all three hint
types. Just see what you can collect.
> One more thing: if I'm supposed to be updating the stuff under doc/ when
> I change lib/, I'd like a pointer on how to do that. :)
I'm afraid that doc/ hasn't been updated for a long time.
Most of it is auto generated by pydoc.
As a rule I'd say, that every time you encounter something strange,
and eventually figure it out, add a comment or docstring in the code.
(Docstrings are the python way to do automatical documentation of
methods. It looks like this:
def square (x):
""" Given x the function returns x^2 """
return x*x)
Tell us how it goes,
Thomas
I've redone the "bling" in the opening book panel.
http://i.imgur.com/mOpn0.png
The ? marks mean "blunder"; a move is considered bad if the book says
"play this 0% of the time".
If the book has performance history: The bars show it. Total length is
proportional to the # of games. Tooltips say:
White scores <b>61.4%</b> - <b>38.6%</b>
Based on 850 games
My next feature (endgame tablebase support) is ready for a demo.
I've implemented both Gaviota EGTB support and endgame info in the
sidepanel: http://i.imgur.com/uIJUr.png
I've made Gaviota TBs optional by design: the data files get big (e.g.
27 MiB for 4-man TBs), on Linux distros the library isn't packaged (yet,
AFAIK), and on Windows no one's yet built it as a shared lib / DLL.
This seems like a good time to discuss which ideas are good and worthy
of landing (post 0.10 of course), and which ideas suck. Does my
side-panel UI make sense for the opening and endgame phases? Is this
really the best way to handle opening books without limiting users to
The PyChess Book?
OK, only read past this point if you want to know more about the
specifics of my work so far. :)
I've added the conf keys (no UI yet) allowRemoteProbes and
GaviotaTbPath. The latter defaults to the system data dir.
If you want to test Gaviota TBs, it's not yet simple.
You must first get the library's source and TB files (See
http://sites.google.com/site/gaviotachessengine/Home/endgame-tablebases-1 : get the git or 0.3.2.3 version of the probing code), install libgtb.so.1.0.1 system-wide or in the data dir as libgtb.so.1 (its SONAME), and put the TB files in the data dir.
By default the current code tries to read Gaviota TBs and falls back to
k4it.de. You can tell what it's using because of a serious bug (which I
plan to fix): TB probing is a synchronous operation. Using k4it, you
have to wait for the sidepanel to load a web page before PyChess can
display a move.
Once I fix the blocking issue, I want to add detailed middlegame
analysis: I'll look into enabling MultiPV mode in engines.
Everything shows up in the Opening Book panel, which will of course be
renamed and refactored once I have things right in the specific game
phases. The hint panel should get its own preferences for the EGTB
folders, whether it should access the web, and how many variations to
analyze in middlegame positions.
I've written the EGTB providers as instance classes and the EndgameTable
class used by the sidepanel and the engine as a singleton. This was
accidental; I'm not sure of the best approach in python. Can I "iterate
over modules" to call global functions?
If all this goes well, I'd like input on how to make the engine behave.
IIRC it currently has strong opening knowledge at all difficulty levels,
and can potentially use EGTBs to improve both strong and weak play. (If
you can tell instantly that a move wins against most responses but loses
to the strongest move... that must be good for something!)
I like your idea of falling back on online tables. While they are
loading, we should display a throbber.
Also, I'm all for creating a weak-player opening book, that the engine
will use on low levels.
It could contain openings such as a4, Ra3, h4, Rh3 :D
Perhaps it would even willingly go into a fools mate some percentage
of the time.
Does the book have any "play 0% of the time" moves?
Putting ? and ?? drawn and lossing moves in the egtb sounds good.
Again, if we can combine it all with a database of openings and
endgames, to provide background knowledge in tooltips, it could be
great.
Thomas
> --
> You received this message because you are subscribed to the Google Groups "PyChess People" group.
> To post to this group, send email to pychess...@googlegroups.com.
> To unsubscribe from this group, send email to pychess-peopl...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pychess-people?hl=en.
>
>
--
Mvh. Thomas
I like to revitalize Justin's work on a modernized Hints panel,
so created a new gbtami-openings-endgames clone
(http://code.google.com/p/pychess/source/clones).
First I merged hes opening-endgames branch to tip.
Then I added ECO and opening name support.
Where we need to enhance it? Can anyone try and comment it, please?
2011/3/11 Lobais <lob...@gmail.com>:
--
You received this message because you are subscribed to a topic in the Google Groups "PyChess People" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pychess-people/uZPTBAomx4w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pychess-peopl...@googlegroups.com.
To post to this group, send email to pychess...@googlegroups.com.
Visit this group at https://groups.google.com/group/pychess-people.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to pychess-people+unsubscribe@googlegroups.com.
To post to this group, send email to pychess-people@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to pychess-peopl...@googlegroups.com.
To post to this group, send email to pychess...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PyChess People" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pychess-people/uZPTBAomx4w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pychess-peopl...@googlegroups.com.
To post to this group, send email to pychess...@googlegroups.com.