Friday, September 7, 2007

Rules of thumb for Rack Leave in Scrabble

This isn't exactly within the ambit of this blog but at least it's about data. While I should have been doing work, I instead made an awesome spreadsheet to find rules of thumb for what the best Scrabble rack leaves are. (rules of thumb below, tables here: http://vizsage.com/other/scrabble/RackLeaveRules.html) The computer program Quackle is one of the strongest scrabble players in the world. It uses the following 'Superleave' valuation: To find "synergies" and "anti-synergies" (dysphoria?), I calculated the marginal valuation for each combo. Basically, how much of the value for each two-leave is explained by the valuation of the component one-leaves, etc? For example,
- From S (7.35) and M (0.08), the joint valuation of MS is 7.44, a marginal gain of 0.1: the joint valuation is almost entirely from S&M. (<-- will lead to interesting google hits). This combination has no synergy.
- From Q (-9.0) and U (-5.1), the joint valuation of QU is 0.2, a marginal gain of 14.3. This is by far the largest synergy; next is ZO at +3.2.

I also played with three-letter synergies -- 3-leave valuations marginally different from the most explanatory 2-leave. General Lessons:

  • Get a feel for the 1-leave list, and the learn these:
    • Synergy: QU OZ JU CH GN WY IN DE JK ER EV GIN JKY JKU ERS KWY HWY ?IN EST JOW ?AL ?EL ?IL IST
    • Anti-Synergy: BP CG FP MV PV CW CQ QS SX LQ BV SZ QR BC CZ VZ MQ RX GQ + most things with blank BPV CGQ BCG LQR FPV LNQ SVZ CMQ CLQ BCV BNV KTV LMQ GKT CFV GMQ FSV LNR DGT
  • Worth keeping with a blank: The letters in "Lei an orc DTM" + the following digrams IN AL IL EL CI AN ER EN AC AR IT NO QU ET DE CO AT OR LO GN OT AM DI CE IM IR DO MO GI AB AG
  • double letters are bad (duh), except FF, which is good.
See the spreadsheet at http://vizsage.com/other/data/superleaves.xls). Don't go betting the house on these results....

Tables (including 1-tile-leave values) are available here.

Labels: , ,

Saturday, September 1, 2007

as3mathlib (formerly WIS math libraries)

I've just imported the WIS mathematics library -- an excellent collection of mathematics routines -- onto Google Code. (You'll find the Actionscript 2 version of the library at its original site)

This library carries a BSD-ish license and includes support for

  • Geometric Objects and Intersection calculations
  • Integral and Differential equation calculations
  • Bezier, Quadric, Polynomial, Complex, Vector and Matrix calculations
  • Symbolic expression parsing

I'm converting the library to Actionscript 3 from Actionscript 2 as time and necessity allow. (That's converting as in getting it to work, and converting as in getting it to be object/pattern oriented). Right now it builds without errors and only a few warnings, but I haven't applied any of the unit tests or checked it for correctness or compatibility.

If you see the value of updating this well-thought out collection of functions, please get in touch and I will add you as a developer. The code is quite modular: it will be straigforward to take modest chunks and get them working independently. I wrote the original author and maintainer, who responded "By all means, continue in the evolution/integration of my library to support AS3" -- but please let me know of any other efforts to update this code, or if a similar or superior math library exists, so that I don't waste my time :).

Email me [flip at the mrflip with the dot and the com] or comment on this post if you'd like to pitch in!

Labels: , , , , , , , , , , , , , , , ,