ilari wrote:
Looks like the meta-object compiler wasn't used to create the moc files. Did you run qmake first in the root directory of Cute Chess?
I did. Deleting everything and staring with a clean checkout fixed it, though. Looks like a make or dependency problem.
Is it possible to get make install support? Or failing that, static linking to libchess would make this a lot easier to use...
Of course, but that's not a high priority for us because Cute Chess (unlike its command line version) is still so early in development.
BTW, I assume you already figured out that you need to run "export LD_LIBRARY_PATH=/home/pascuttg/git/cute-cli/projects/lib" to run cutechess or cutechess-cli? You can also put that in a startup script (see cutechess-cli.sh in my binary packages for Linux and OSX).
Last edited by ilari on Wed Apr 08, 2009 12:47 pm, edited 1 time in total.
ilari wrote:
BTW, I assume you already figured out that you need to run "export LD_LIBRARY_PATH=/home/pascuttg/git/cute-cli/projects/lib" to run cutechess or cutechess-cli?
Yes, which is why I asked about having libchess linked statically
ilari wrote:
BTW, I assume you already figured out that you need to run "export LD_LIBRARY_PATH=/home/pascuttg/git/cute-cli/projects/lib" to run cutechess or cutechess-cli?
Yes, which is why I asked about having libchess linked statically
In this case, no scripts or anything are needed.
It's very simple to link to libchess statically if you want to: just run "qmake -config static" instead of "qmake", that's all you need to change. And remeber to run "make distclean" to clean things up before such big changes. Getting a new checkout of our repository should never be needed.
ilari wrote:
It's very simple to link to libchess statically if you want to: just run "qmake -config static" instead of "qmake", that's all you need to change.
Which is weird because this is mainline Spanish! How can it not be in book? I get this with the books on Leo's Winboard site and with mine.
I can confirm this. It was the castling encoding that was the problem (the king "captures" the rook). I just pushed a commit to our repo that fixes this. No binaries yet. But if you use Git you can just do "git pull" to update.
I don't know if I can help with the b4 openings. If your book has that move, and it's not a big book, then that move will be played occasionally. Here's the relevant code:
BookMove OpeningBook::move(quint64 key) const
{
BookMove move;
// There can be multiple entries/moves with the same key.
// We need to find them all to choose the best one
QList<Entry> entries = m_map.values(key);
if (entries.size() == 0)
return move;
// Calculate the total weight of all available moves
int totalWeight = 0;
foreach (const Entry& entry, entries)
totalWeight += entry.weight;
if (totalWeight <= 0)
return move;
// Pick a move randomly, with the highest-weighted move having
// the highest probability of getting being picked.
int pick = qrand() % totalWeight;
int currentWeight = 0;
foreach (const Entry& entry, entries)
{
currentWeight += entry.weight;
if (currentWeight > pick)
return entry.move;
}
return move;
}
So the moves with the biggest weights have the biggest chances of being played, but there's still a small chance that an unpopular move is played too.