Commit graph

27 commits

Author SHA1 Message Date
Olivier Teulière
a53d99a8d3 MoveSelector: add another heuristic 2013-01-19 00:36:08 +01:00
Olivier Teulière
075dbaa2fb MoveSelector: add a new heuristic (deactivated for now) 2013-01-19 00:36:08 +01:00
Olivier Teulière
30385abe30 Results: new MasterResults implementation, using the MoveSelector class.
This avoids calling MoveSelector everywhere in the code.
2013-01-19 00:36:07 +01:00
Olivier Teulière
f6ced69c9e Make sure some class members are initialized (bugs reported by Coverity) 2012-10-11 23:21:32 +02:00
Olivier Teulière
4200e33c17 Change the copyright years for all the files modified in 2012 2012-10-11 13:45:24 +02:00
Olivier Teulière
bf42c49850 Added loggers to most classes 2012-02-19 13:07:29 +01:00
Olivier Teulière
b7fff8b4a1 - Removed various C-style casts
- Factorized code in the Bag class
2010-03-06 16:54:20 +00:00
Olivier Teulière
7dcd9898ed Fixed a bug in PercentResults: AI players with a level lower than 100 could still play as if they were (almost) at level 100! 2010-02-20 13:31:12 +00:00
Olivier Teulière
bb13f634b3 Sort the training results using the dictionary order as alphabetical order 2009-07-03 23:00:12 +00:00
Olivier Teulière
1df3c3ff51 Updated a few copyright dates 2009-01-24 17:44:56 +00:00
Olivier Teulière
87e1d4795b Sorting the search results happens to be quite slow, often much slower than the search itself.
But we don't need to sort them all the time, and in general we don't even need to keep all the rounds.

This commit greatly improves the search performance by filtering the results in 3 different ways, depending on the context:
 - A limit to the number of results can be given (useful for the training mode). The kept results are the best ones, not the first ones found by the search.
 - When only the best round is needed (when the AI is playing with level 100, or when preparing the rack for an explosive game), we don't need to keep rounds with a lower score
 - When the AI has a level lower than 100, it is still possible to skip many rounds

The search limit in training mode is configurable (defaulting to 100) and can be deactivated.
2009-01-22 18:30:22 +00:00
Olivier Teulière
4b766d2622 - Bumped version to 1.8-cvs
- Improved the error message when the dictionary cannot be loaded at startup
 - Updated the french translation
 - Made some Game fields private
 - Added more constness
2008-11-22 14:40:25 +00:00
Olivier Teulière
70be50c64e A lot of clean-up:
- Removed logiv from the History class
 - Used BOOST_FOREACH to simplify loops
 - Remove useless annotations and doxygen blocks
 - Added some constness
 - Marked Training::setRack() as deprecated
 - Improved compilation order in game/
2008-11-22 13:09:28 +00:00
Olivier Teulière
e3ef487ebb Sort the search result in a predictible way. The unit tests have been adapted accordingly. 2008-10-16 17:51:16 +00:00
Olivier Teulière
597673e8e5 Fixed an invalid read when sorting the search results and adapted regression scenarii 2008-07-04 19:03:12 +00:00
Olivier Teulière
c7f85ce151 - Search results with the same score are now sorted alphabetically
- Adapted test scenarii for the new order of results
2008-03-03 22:13:58 +00:00
Olivier Teulière
e7a8d01a8d Merged the "cppdic" branch back into HEAD.
There are too many change to list properly, here is an overview of the main changes:
 - the dictionary is now in C++
 - the dictionary has a new format, where it is possible to specify the letters,
   their points, their frequency, ... It is backwards compatible.
 - Eliot now supports non-ASCII characters everywhere
 - i18n of the compdic, listdic, regexpmain binaries
 - i18n of the wxWidgets interface (now in english by default)
2008-01-08 13:52:32 +00:00
Antoine Fraboulet
4665fa176b - add comments and emacs mode 2006-01-01 19:49:35 +00:00
Antoine Fraboulet
d3e9d1e0ac - off by one in History. corrected. all regression tests ok.
Scenario: training_dict
Scenario: training_bag
Scenario: training_search
Scenario: training_play
Scenario: duplicate_2_ai
Scenario: freegame_passing
Scenario: freegame_change
Scenario: freegame_3_ai

Summary: Everything was OK.
2005-12-27 00:06:23 +00:00
Antoine Fraboulet
3bde5c3da5 - since we use History, the first round is numbered 1
- separate sort_by_points method, removed call from board_search
2005-12-26 21:22:21 +00:00
Olivier Teulière
5b682ef9b8 - Removed Game::format*
- Added Game::getPlayer
2005-11-05 15:48:59 +00:00
Olivier Teulière
fe13a5e627 Removed the $Id:$ lines on HEAD 2005-11-04 20:00:05 +00:00
Olivier Teulière
e3bc46b114 Updated licence text with FSF's new address. 2005-10-23 14:53:42 +00:00
Olivier Teulière
57c1fcaf8e Added an ASSERT macro, which aborts execution if the condition given as a
parameter is not verified. This simplifies te code in several places.
The old PDEBUG macro has been removed.
2005-03-27 21:45:04 +00:00
Olivier Teulière
82547c5f66 - Better handling of the players with inheritance and with a clean interface
for the AI players
 - Moved the search results accessors from Game to Training
2005-02-17 20:01:59 +00:00
Olivier Teulière
222d1989a2 Cosmetics 2005-02-13 17:14:31 +00:00
Olivier Teulière
b7032e2d78 - The Game library is now in C++.
This simplifies the code in many places, and allows inheritance of the
   game mode classes (Training, Duplicate and FreeGame).
 - A Tile is no more an unsigned char, but a class: it should help supporting
   i18n of the game. The Dic library still uses unsigned chars though.
 - Improved the configure script, to enable/disable the compilation of some
   interfaces.
 - Added a ncurses interface, much nicer than the text one. The game mode and
   the number of players are currently hardcoded, it is not possible to change
   them interactively (yet).
 - Repaired the save/load functions.

NOTE: The wxWindows interface compiles, but is completely broken. I'm afraid it
needs a full rewrite (to support the various game modes in particular).
2005-02-05 11:14:56 +00:00