Commit graph

54 commits

Author SHA1 Message Date
Eric House
fd9b9f85e2 make util_hiliteCell conditional, and remove from android where it
wasn't used anyway.
2012-10-05 18:51:32 -07:00
Eric House
de9a408b15 Revert "Fix bug where if word being scored for long-touch-on-scoreboard wasn't"
This reverts commit 07912bdcdb.
Problem is it breaks WARN-PHONIES
2012-08-15 18:01:36 -07:00
Eric House
25e65d3e6f cleanup: don't return from middle of function 2012-08-12 19:45:54 -07:00
Eric House
07912bdcdb Fix bug where if word being scored for long-touch-on-scoreboard wasn't
in current player's dictionary it'd show up empty: word, once played,
needn't be legal to be displayed.
2012-08-12 19:25:16 -07:00
Eric House
464696566d get rid of NODE_CAN_4. Not change to post-compiled code 2012-08-01 20:29:15 -07:00
Eric House
8f04bfadaf modify engine score ranking to include estimate of bonus to be earned
if all tiles are used (ending the game and triggering penalties for
other players.)  Changes are protected by compile-time flags currently
not turned on.
2012-07-29 08:35:08 -07:00
Eric House
f2c4e39cd4 add dict_makeIndex(). Works, but only for depth==1 so far (A, not AA or AAA). 2011-10-26 07:10:50 -07:00
Andy2
7c7cd82e0a add code to iterate over words in a dict. Works on Linux (iterating
forward only) but disabled at compile time.  Idea's to have a dict
browser.  There was some simple refactoring in common code Android
uses, and that tests fine.
2011-10-21 18:51:33 -07:00
Andy2
b31e829414 Remove file-format differences between debug and non-debug versions.
Fix curses to compile non-debug.
2011-10-18 18:52:37 -07:00
Andy2
e4b952222a unify two ways of saving words encountered during scoring, removing
one and changing the site that used it to use the other.  Not visible
outside of common, but should make it easier to harvest a list of all
words for one move or the entire game.
2011-09-02 19:11:04 -07:00
Andy2
35f059e14c remove logging 2011-08-08 20:21:55 -07:00
Andy2
de16ee93d7 get rid of some logging 2011-07-20 18:46:55 -07:00
Andy2
3b7b4802a9 add ability to specify, track and use separate dictionaries for each
player.  Works for gtk client.  Compiles for Android but there's no UI
yet to specify more than one dict.  Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Andy2
6ccf0c167c fix next-hint which I just broke: need to track whether working on
behalf of robot after all, though it's not needed in the API, to
distinguish case where moves must be cached (for next-hint feature).
2011-01-11 18:10:48 -08:00
Eric House
2b502a39c6 fix mod-by-zero error when iq == 2 2011-01-10 18:19:10 -08:00
Andy2
efb54c7b05 fix compile errors the stricter android compiler found. 2011-01-10 06:56:11 -08:00
Andy2
f111b78714 switch from tracking robot intelligence as a per-game boolean
implemented (when not smart) as trying to match the human's score to a
per-robot value between 1 and 100 that gives the percentage of best
moves to store before picking randomly from among them.  So a 1 means
save only the best move and always pick it; 100 means save all the
best moves (how many are saved is compile-time configurable) and pick
one of them.  Because it's settable per-robot a smarter robot can be
played against a dumber one (though I may choose not to make it
settable per-robot on shipping versions.)
2011-01-10 06:44:28 -08:00
Andy2
5b33df4e25 modify model_getTile to take NULL for out parms where the result is
often ignored, then pass NULL instead of the address of variables
called 'ignore'.  Should be no behavior change.
2010-10-29 19:52:15 -07:00
Andy2
3dba8ba13b Fix bug reported by user: if robot finishes a search but fails to find
a move it's still done with its turn and must trade or pass.
2010-08-24 18:38:12 -07:00
Andy2
c98451c62a remove excess logging 2010-07-07 06:50:47 -07:00
Andy2
a7c77785f6 return false if no move found -- to really fix the crash 2010-07-07 06:40:34 -07:00
Andy2
5725f36db8 detect when no moves found that meet criteria to fix (I think) crash
when iterating from highest to lowest move using prevMove.
2010-07-07 06:33:01 -07:00
Andy2
992f45e1bf new feature: previous move. Modify engine to traverse the set of all
possible moves in either order both within a cached subset and when
building cached subsets.  Still a bit buggy (shows the same move twice
when moving backwards and reaches the top-scoring move) and not well
tested.
2010-07-07 05:27:57 -07:00
Andy2
953b2bcc55 cleanup; allow setting NUM_SAVED_ENGINE_MOVES per-platform 2010-06-28 21:08:13 -07:00
eehouse
587159f5d7 fix to compile when XWFEATURE_SEARCHLIMIT off. Same as rev 3023 for
this file.
2010-02-12 07:12:30 +00:00
ehouse
76c0a518f1 change -j to -j3. No code change. 2009-04-14 03:27:32 +00:00
ehouse
641ae18864 Use new dict api to support utf8 faces. 2009-04-05 19:20:22 +00:00
ehouse
ce2420840d a bit of cleanup 2008-11-22 19:43:47 +00:00
ehouse
6e9f5791d6 Fix bug: when using hint limits to restrict first move on empty board
limits were ignored for the vertical search.  Fix is to make
special-case treatment of first move more integrated so special limits
code isn't needed.
2008-11-22 19:32:42 +00:00
ehouse
f749fdd560 Remove all tabs. No code changes. 2008-05-31 03:26:16 +00:00
ehouse
ebad668227 add some consts. 2008-05-06 12:49:37 +00:00
ehouse
1172502b04 If search limits in use, try vertical as well as horizontal initial moves. 2008-03-29 19:40:03 +00:00
ehouse
eeebeca542 substitute macro for common sizeof(x)/sizeof(x[0]) pattern; no generated code change 2007-05-26 14:03:07 +00:00
ehouse
f56b170b2a cleanup. No change in generated code. 2007-01-27 15:07:02 +00:00
ehouse
1838640823 Fix bug where sign extention on 16-bit processors caused too many bits
set in crosschecks.
2006-11-10 08:08:59 +00:00
ehouse
213cfbb050 set crosschecks inline 2006-09-23 15:12:10 +00:00
ehouse
16519a2070 fix bug checking crosschecks with more than 32 tiles. 2006-09-02 05:29:13 +00:00
ehouse
4daabf6fe5 Set -Wunused-parameter for those versions of gcc that support it, and
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)).  There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
5d161cdd77 optimize for the case where tiles are < 32. Previous imlementation of
64-tiles support increases engine times by ~5%.  This removes that effect.
I can't measure any slowdown vs. pre-change engines.
2006-08-12 01:59:03 +00:00
ehouse
c41b211735 increase possible number of unique tiles from 32 to 64 in order to
support Slovak which has 40.  This change is preliminary: it seems to
work for both existing and dicts with >32 chars, but it breaks backwards
compatibility: existing saved games will crash this code.  I think the
fix is to deduce the number of bits per tile from the number in the
dictionary being used, but that's not in yet.
2006-08-09 04:56:34 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
6728862399 cast to stop warning on wince 2005-06-27 03:56:09 +00:00
ehouse
27b6f310b5 bug: comparison was dropping words with the same score as all those
already cached.
2005-01-25 04:39:55 +00:00
ehouse
aa6e46d05f always set nTilesMax so works when XWFEATURE_SEARCHLIMIT not defined 2004-12-11 04:16:48 +00:00
ehouse
fd75f3324e Pass number of blanks to util_engineStarting 2004-10-07 13:51:03 +00:00
ehouse
38a4170fe0 cleanup; fix for 4-byte nodes on ARM 2004-09-28 01:03:07 +00:00
ehouse
d9efe4258b cleanup for no hintlimit feature case 2004-06-27 04:35:42 +00:00
ehouse
c6c6d38dfc engine is now responsile for asking for and tracking how many tiles in
the tray should be used in hints.  Moved responsibility here from
platform because platform doesn't know when a turn ends, and end of a
turn (engine reset) is the right place to reset the values.
2004-06-25 06:49:49 +00:00
ehouse
7914876294 Change engine to, when given a rect that's a subset of the board,
constrain the search for moves to those that involve filling only
tiles within the rect -- while still using the rest of the board as
context for the moves.  Robot moves use the whole board.
2004-06-15 01:58:09 +00:00
ehouse
4fdf6fe60a new param to figureMoveScore 2004-04-30 08:27:24 +00:00