A few years ago I mooted an algorithm to replace Monte Carlo sampling, whose benefit would be to return a score versus probability curve rather than just a 'best score' of the opponent, which is a metric that is unreliable if the monte carlo happened to hit a very low probability but high value play. Here's an analysis of one ply of a game using this method. We assume that the board below is what the opponent sees after I have played some hypothesized move, and that I would run this analysis for every move that I was considering playing. The analysis below is basically what would be output by the program, though in fact at this early stage of development I've had to go in and edit the output a little by hand to remove some diagnostics and to format it better. =========================================================== If the board looks like this after my play: #..-...#...-..D .+...=..GLYCINE ..+...-.-.R.+.R -..+.TOAsTIE..M ....NAB...V.... .=.KOP...=D.H=. ..-.PEAGE...U.. AMATE.WUSS.-R.# ..-...-E-I..D.. .F...=.R.XI.E=. .O..+..I..L.N.. VERECUND.GITS.- IT+...-O-LAH+.. AA...=.n.I.E.JO EL.-...S.T.WOOF I hold no tiles left. Opponent's tiles may be any 7 from "abeinnoqruyz". There are 582 possible racks from this bag (which can be drawn in 792 ways) 2110 opponent plays generated Opponent will score with this degree this much or more of confidence: 0132: 2 ( 2) 0.25% confidence 0118: 1 ( 3) 0.38% confidence 0110: 2 ( 5) 0.63% confidence 0101: 1 ( 6) 0.76% confidence 0085: 1 ( 7) 0.88% confidence 0084: 4 ( 11) 1.39% confidence 0083: 1 ( 12) 1.52% confidence 0079: 2 ( 14) 1.77% confidence 0078: 12 ( 26) 3.28% confidence 0066: 1 ( 27) 3.41% confidence 0056: 5 ( 32) 4.04% confidence 0055: 40 ( 72) 9.09% confidence 0051: 61 ( 133) 16.79% confidence 0049: 15 ( 148) 18.69% confidence 0048: 60 ( 208) 26.26% confidence 0047: 70 ( 278) 35.10% confidence 0045: 45 ( 323) 40.78% confidence 0043: 14 ( 337) 42.55% confidence 0042: 138 ( 475) 59.97% confidence 0041: 25 ( 500) 63.13% confidence 0039: 37 ( 537) 67.80% confidence 0038: 13 ( 550) 69.44% confidence 0036: 76 ( 626) 79.04% confidence 0035: 26 ( 652) 82.32% confidence 0032: 1 ( 653) 82.45% confidence 0031: 15 ( 668) 84.34% confidence 0030: 16 ( 684) 86.36% confidence 0029: 38 ( 722) 91.16% confidence 0028: 8 ( 730) 92.17% confidence 0027: 34 ( 764) 96.46% confidence 0026: 1 ( 765) 96.59% confidence 0025: 16 ( 781) 98.61% confidence 0024: 3 ( 784) 98.99% confidence 0021: 1 ( 785) 99.12% confidence 0020: 4 ( 789) 99.62% confidence 0019: 3 ( 792) 100.00% confidence Calculation of all possible responses took .09s wall time. Let us test this probability curve by taking some random racks and finding the highest scores: Note that these were already precomputed as a result of the global analysis already done; finding these best plays is just a table lookup, not a computation. Let's try: norquae Place tiles roque at F1 (1) for 47 Let's try: ouzeqni Place tiles quinze at A3 (1) for 55 Let's try: rzqibao Place tiles riza at F1 (1) for 42 Let's try: aynuoer Place tiles uey at E3 (1) for 29 Let's try: rnieanu Place tiles inaner at B3 (1) for 27 Let's try: oqzaubi Place tiles zobu at F1 (1) for 48 Let's try: yinroun Place tiles noy at A7 (1) for 25 ======================== So as you can see, the score distribution looks pretty good, and by setting the desired confidence level according to how far ahead or behind you are in the game (i.e. if you want to play it safe or need to take some risks) you can make a pretty good evaluation of the range of replies to your move at the first level. I've only recently got this working acceptably, and I haven't taken it beyond one ply yet, but even at one ply it stops you making blunders with the 3WS squares etc. (Also to be more realistic I need to start by enumerating all my plays first and then performing the above calculation in order to find the best of my plays. I haven't done that yet because I haven't yet coded the case where I know what tiles I am holding, when calculating the opponents reply. It currently assumes that I have played out all 7 of my tiles which is clearly false - I just haven't written the extra code yet, it's not actually a problem.) Knowing what tiles I have remaining, I can do another half ply after what's shown above, with the knowlege of my partial rack. This has the effect of removing the need for a heuristic rack leave calculation because it works out exactly how better or worse off I am due to my rack leave. Graham