},
{
"cell_type": "code",
- "execution_count": 43,
+ "execution_count": 51,
"metadata": {
- "collapsed": true
+ "collapsed": false
},
"outputs": [],
"source": [
"def decoys(grid, words, all_words, limit=60):\n",
" decoy_words = []\n",
+ " dlen_limit = max(len(w) for w in words)\n",
" while len(words) + len(decoy_words) < limit:\n",
" d = random.choice(all_words)\n",
- " if d not in words and not present(grid, d)[0]:\n",
+ " if d not in words and len(d) < dlen_limit and not present(grid, d)[0]:\n",
" decoy_words += [d]\n",
" return decoy_words"
]
},
{
"cell_type": "code",
- "execution_count": 45,
+ "execution_count": 52,
"metadata": {
"collapsed": false
},
{
"data": {
"text/plain": [
- "['blindfolding',\n",
- " 'televised',\n",
- " 'climaxed',\n",
- " 'autumns',\n",
- " 'aquaria',\n",
- " 'bilks',\n",
- " 'psychologies',\n",
- " 'sparkled',\n",
- " 'dorkiest',\n",
- " 'corollas',\n",
- " 'polygons',\n",
- " 'accessioning',\n",
- " 'bubbled',\n",
- " 'astringency',\n",
- " 'debunking',\n",
- " 'cannery',\n",
- " 'exhilarates',\n",
- " 'overzealous',\n",
- " 'primping',\n",
- " 'geckos',\n",
- " 'admiration',\n",
- " 'misconstructions']"
+ "['ditches',\n",
+ " 'fuzes',\n",
+ " 'antivirals',\n",
+ " 'chronology',\n",
+ " 'yacked',\n",
+ " 'percentages',\n",
+ " 'heftier',\n",
+ " 'inimitably',\n",
+ " 'conveys',\n",
+ " 'remaindered',\n",
+ " 'retaken',\n",
+ " 'reckoned',\n",
+ " 'emery',\n",
+ " 'squats',\n",
+ " 'tenderfoots',\n",
+ " 'sociology',\n",
+ " 'arbutuses',\n",
+ " 'betook',\n",
+ " 'coniferous',\n",
+ " 'gambled',\n",
+ " 'crouching']"
]
},
- "execution_count": 45,
+ "execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
},
{
"cell_type": "code",
- "execution_count": 46,
+ "execution_count": 53,
"metadata": {
"collapsed": false,
"scrolled": true
"name": "stdout",
"output_type": "stream",
"text": [
- "wombs (True, 1, 19, <Direction.downleft: 7>)\n",
- "persimmons (True, 14, 7, <Direction.upright: 6>)\n",
- "computerisation (True, 15, 18, <Direction.left: 1>)\n",
- "ascribes (True, 14, 17, <Direction.left: 1>)\n",
- "coopering (True, 1, 11, <Direction.down: 4>)\n",
- "goalies (True, 17, 12, <Direction.left: 1>)\n",
- "beamed (True, 3, 0, <Direction.down: 4>)\n",
- "modifying (True, 11, 19, <Direction.down: 4>)\n",
- "insets (True, 13, 2, <Direction.right: 2>)\n",
- "cigarets (True, 12, 3, <Direction.up: 3>)\n",
- "statures (True, 2, 7, <Direction.left: 1>)\n",
- "libels (True, 6, 7, <Direction.down: 4>)\n",
- "remarked (True, 3, 19, <Direction.down: 4>)\n",
- "baggy (True, 13, 11, <Direction.right: 2>)\n",
- "juxtaposes (True, 19, 17, <Direction.left: 1>)\n",
- "mesdames (True, 7, 13, <Direction.up: 3>)\n",
- "grumpiness (True, 4, 17, <Direction.down: 4>)\n",
- "artefacts (True, 16, 6, <Direction.right: 2>)\n",
- "skeins (True, 10, 2, <Direction.down: 4>)\n",
- "assizes (True, 6, 12, <Direction.up: 3>)\n",
- "inflow (True, 6, 5, <Direction.upright: 6>)\n",
- "depleting (True, 7, 1, <Direction.down: 4>)\n",
- "beeped (True, 11, 16, <Direction.left: 1>)\n",
- "reneges (True, 18, 17, <Direction.left: 1>)\n",
- "interning (True, 12, 13, <Direction.left: 1>)\n",
- "yellowish (True, 2, 10, <Direction.down: 4>)\n",
- "regicides (True, 19, 0, <Direction.right: 2>)\n",
- "eyelids (True, 18, 5, <Direction.right: 2>)\n",
- "cools (True, 7, 9, <Direction.upleft: 5>)\n",
- "orgy (True, 7, 18, <Direction.up: 3>)\n",
- "nifty (True, 8, 4, <Direction.up: 3>)\n",
- "knottier (True, 0, 9, <Direction.left: 1>)\n",
- "destroyers (True, 8, 0, <Direction.down: 4>)\n",
- "unfurls (True, 14, 18, <Direction.up: 3>)\n",
- "tinctured (True, 1, 0, <Direction.right: 2>)\n",
- "bigamy (True, 4, 2, <Direction.down: 4>)\n",
- "winos (True, 17, 14, <Direction.right: 2>)\n",
- "essays (True, 11, 9, <Direction.left: 1>)\n",
- "blindfolding (False, 0, 0, <Direction.left: 1>)\n",
- "televised (False, 0, 0, <Direction.left: 1>)\n",
- "climaxed (False, 0, 0, <Direction.left: 1>)\n",
- "autumns (False, 0, 0, <Direction.left: 1>)\n",
- "aquaria (False, 0, 0, <Direction.left: 1>)\n",
- "bilks (False, 0, 0, <Direction.left: 1>)\n",
- "psychologies (False, 0, 0, <Direction.left: 1>)\n",
- "sparkled (False, 0, 0, <Direction.left: 1>)\n",
- "dorkiest (False, 0, 0, <Direction.left: 1>)\n",
- "corollas (False, 0, 0, <Direction.left: 1>)\n",
- "polygons (False, 0, 0, <Direction.left: 1>)\n",
- "accessioning (False, 0, 0, <Direction.left: 1>)\n",
- "bubbled (False, 0, 0, <Direction.left: 1>)\n",
- "astringency (False, 0, 0, <Direction.left: 1>)\n",
- "debunking (False, 0, 0, <Direction.left: 1>)\n",
- "cannery (False, 0, 0, <Direction.left: 1>)\n",
- "exhilarates (False, 0, 0, <Direction.left: 1>)\n",
- "overzealous (False, 0, 0, <Direction.left: 1>)\n",
- "primping (False, 0, 0, <Direction.left: 1>)\n",
- "geckos (False, 0, 0, <Direction.left: 1>)\n",
- "admiration (False, 0, 0, <Direction.left: 1>)\n",
- "misconstructions (False, 0, 0, <Direction.left: 1>)\n"
+ "freckled (False, 0, 0, <Direction.left: 1>)\n",
+ "transcripts (False, 0, 0, <Direction.left: 1>)\n",
+ "dinnering (False, 0, 0, <Direction.left: 1>)\n",
+ "insulating (False, 0, 0, <Direction.left: 1>)\n",
+ "regurgitates (False, 0, 0, <Direction.left: 1>)\n",
+ "drouthes (False, 0, 0, <Direction.left: 1>)\n",
+ "cocky (False, 0, 0, <Direction.left: 1>)\n",
+ "stodgy (False, 0, 0, <Direction.left: 1>)\n",
+ "bestrides (False, 0, 0, <Direction.left: 1>)\n",
+ "perceives (False, 0, 0, <Direction.left: 1>)\n",
+ "waned (False, 0, 0, <Direction.left: 1>)\n",
+ "pisses (False, 0, 0, <Direction.left: 1>)\n",
+ "alienating (False, 0, 0, <Direction.left: 1>)\n",
+ "hyperbolas (False, 0, 0, <Direction.left: 1>)\n",
+ "yeshivoth (False, 0, 0, <Direction.left: 1>)\n",
+ "allured (False, 0, 0, <Direction.left: 1>)\n",
+ "outstaying (False, 0, 0, <Direction.left: 1>)\n",
+ "bureaus (False, 0, 0, <Direction.left: 1>)\n",
+ "tragedians (False, 0, 0, <Direction.left: 1>)\n",
+ "wooed (False, 0, 0, <Direction.left: 1>)\n",
+ "unwary (False, 0, 0, <Direction.left: 1>)\n",
+ "provoking (False, 0, 0, <Direction.left: 1>)\n",
+ "curies (False, 0, 0, <Direction.left: 1>)\n",
+ "deviltry (False, 0, 0, <Direction.left: 1>)\n",
+ "wooly (False, 0, 0, <Direction.left: 1>)\n",
+ "abysmally (False, 0, 0, <Direction.left: 1>)\n",
+ "ladled (False, 0, 0, <Direction.left: 1>)\n",
+ "tamable (False, 0, 0, <Direction.left: 1>)\n",
+ "minors (False, 0, 0, <Direction.left: 1>)\n",
+ "aortas (False, 0, 0, <Direction.left: 1>)\n",
+ "souses (False, 0, 0, <Direction.left: 1>)\n",
+ "heinously (False, 0, 0, <Direction.left: 1>)\n",
+ "cardiac (False, 0, 0, <Direction.left: 1>)\n",
+ "peons (True, 17, 1, <Direction.right: 2>)\n",
+ "karate (False, 0, 0, <Direction.left: 1>)\n",
+ "tansy (False, 0, 0, <Direction.left: 1>)\n",
+ "unruly (False, 0, 0, <Direction.left: 1>)\n",
+ "absently (False, 0, 0, <Direction.left: 1>)\n",
+ "pads (False, 0, 0, <Direction.left: 1>)\n",
+ "ditches (False, 0, 0, <Direction.left: 1>)\n",
+ "fuzes (False, 0, 0, <Direction.left: 1>)\n",
+ "antivirals (False, 0, 0, <Direction.left: 1>)\n",
+ "chronology (False, 0, 0, <Direction.left: 1>)\n",
+ "yacked (False, 0, 0, <Direction.left: 1>)\n",
+ "percentages (False, 0, 0, <Direction.left: 1>)\n",
+ "heftier (False, 0, 0, <Direction.left: 1>)\n",
+ "inimitably (False, 0, 0, <Direction.left: 1>)\n",
+ "conveys (False, 0, 0, <Direction.left: 1>)\n",
+ "remaindered (False, 0, 0, <Direction.left: 1>)\n",
+ "retaken (False, 0, 0, <Direction.left: 1>)\n",
+ "reckoned (False, 0, 0, <Direction.left: 1>)\n",
+ "emery (False, 0, 0, <Direction.left: 1>)\n",
+ "squats (False, 0, 0, <Direction.left: 1>)\n",
+ "tenderfoots (False, 0, 0, <Direction.left: 1>)\n",
+ "sociology (False, 0, 0, <Direction.left: 1>)\n",
+ "arbutuses (False, 0, 0, <Direction.left: 1>)\n",
+ "betook (False, 0, 0, <Direction.left: 1>)\n",
+ "coniferous (False, 0, 0, <Direction.left: 1>)\n",
+ "gambled (False, 0, 0, <Direction.left: 1>)\n",
+ "crouching (False, 0, 0, <Direction.left: 1>)\n"
]
}
],
},
{
"cell_type": "code",
- "execution_count": 47,
+ "execution_count": 54,
"metadata": {
"collapsed": false
},
"name": "stdout",
"output_type": "stream",
"text": [
- "tuiababblerssknalbft\n",
- "gnewerodeswskrowerif\n",
- "nballooningosfriedum\n",
- "iuebksidesaddlessldt\n",
- "mrncdbmnnyllasuaceet\n",
- "udiesnettirwtsohglli\n",
- "uepoeyremeenoyreveum\n",
- "cnuselitnegfatterbdp\n",
- "asslmulleveiadieneer\n",
- "visnmewsrelrsbtleddi\n",
- "crouchinghogetrzooms\n",
- "dstrihstaewseteaotoo\n",
- "vkssrdovulatesrldgon\n",
- "snnvengefullyuiawets\n",
- "uiofendelleuferrcosi\n",
- "ahsdenoixelpmocluitt\n",
- "vcdauthorisesnfsnenp\n",
- "eyoelmferociouslypng\n",
- "lngimmpauperisedtnon\n",
- "ytnthstnemecitnehhpc\n",
- "38 words added; 7 directions\n",
- "Present: abrades authorises babblers ballooning blanks causally chinks complexioned crouching deluded emery enticements erodes everyone fatter ferociously fireworks fried gentiles ghostwritten godsons imprisons mews ovulates owlets pauperised refuelled retracing sidesaddles suavely supine sweatshirts unburdens vacuuming vellum vengefully yeti zooms\n",
- "Decoys: chastened doodling ethnologists executrixes freelancing generously halfheartedness harries kinswoman mangles narrowly optimising oversimplifies polystyrene recounts riffing slicking smackers squashy thirsting tiebreakers unexampled\n"
+ "ihaceglstcongealedim\n",
+ "locnlanmecdwsieyieyp\n",
+ "uslrbacimdmedruyirfo\n",
+ "hyacaascsatireeaiefm\n",
+ "epyatooheutryldpifum\n",
+ "chiuantaedrivgeouihe\n",
+ "diehehdftsionrsdmoil\n",
+ "ylrnpsounaonhspadtrs\n",
+ "linhegiglgirgcidagug\n",
+ "gsaornesallliseilnwo\n",
+ "nlnenigpsnnhllsrlins\n",
+ "ityvuprergselipdohyi\n",
+ "mstismocwduusngeygsw\n",
+ "oextoooincnhksshsuci\n",
+ "cmiiprvfanedcwuctook\n",
+ "ersnptyiaclippingsur\n",
+ "biauindcemostlysietd\n",
+ "rflpebesmsskrepppsil\n",
+ "yssorgnileereouepyna\n",
+ "taeaeweathercockswgs\n",
+ "36 words added; 7 directions\n",
+ "Present: acceding alloys annulled becomingly chorusing chugs clashes clayier clippings congealed dullness espies firmest groovy groupers hogans huffy kiwis matins mostly outmoded perks pommels punitive reeling scouting sixty soppier soughing specifics syphilis taillights tromping unrepeatable weathercocks wispy\n",
+ "Decoys: belittled buzzwords climbs congaed criterions drifters exteriors filial flattery gambolling haversacks insiders interferon leukaemia liabilities mavens mentalities padlocking ptarmigans puking retarded seaming skimpiness wanderers\n"
]
}
],
},
{
"cell_type": "code",
- "execution_count": 49,
+ "execution_count": 55,
"metadata": {
"collapsed": false
},
},
{
"cell_type": "code",
- "execution_count": 111,
+ "execution_count": 112,
"metadata": {
"collapsed": false
},
"text": [
"\n",
"wordsearch00.txt\n",
- "Longest word present: testamentary, 12 letters\n",
- "Longest word absent: decontamination, 15 letters\n",
- "133 unused letters\n",
- "Longest makeable word: decontamination, 15\n",
+ "Longest word present: yellowing, 9 letters\n",
+ "Longest word absent: sequined, 8 letters\n",
+ "147 unused letters\n",
+ "Longest makeable word: pettiest, 8\n",
"\n",
"wordsearch01.txt\n",
- "Longest word present: corresponded, 12 letters\n",
- "Longest word absent: antihistamines, 14 letters\n",
- "115 unused letters\n",
- "Longest makeable word: universality, 12\n",
+ "Longest word present: soubriquets, 11 letters\n",
+ "Longest word absent: swallowing, 10 letters\n",
+ "124 unused letters\n",
+ "Longest makeable word: extradited, 10\n",
"\n",
"wordsearch02.txt\n",
- "Longest word present: presupposing, 12 letters\n",
- "Longest word absent: chloroformed, 12 letters\n",
- "114 unused letters\n",
- "Longest makeable word: chloroformed, 12\n",
+ "Longest word present: unattended, 10 letters\n",
+ "Longest word absent: runabouts, 9 letters\n",
+ "120 unused letters\n",
+ "Longest makeable word: runabouts, 9\n",
"\n",
"wordsearch03.txt\n",
- "Longest word present: pasteurisation, 14 letters\n",
- "Longest word absent: spotlessness, 12 letters\n",
- "115 unused letters\n",
- "Longest makeable word: spotlessness, 12\n",
+ "Longest word present: indemnifications, 16 letters\n",
+ "Longest word absent: propagandised, 13 letters\n",
+ "129 unused letters\n",
+ "Longest makeable word: propagandised, 13\n",
"\n",
"wordsearch04.txt\n",
- "Longest word present: domestication, 13 letters\n",
- "Longest word absent: discountenances, 15 letters\n",
- "123 unused letters\n",
- "Longest makeable word: discountenances, 15\n",
+ "Longest word present: ostentatiously, 14 letters\n",
+ "Longest word absent: oleomargarine, 13 letters\n",
+ "128 unused letters\n",
+ "Longest makeable word: oleomargarine, 13\n",
"\n",
"wordsearch05.txt\n",
- "Longest word present: refinancing, 11 letters\n",
- "Longest word absent: polytechnics, 12 letters\n",
- "124 unused letters\n",
- "Longest makeable word: polytechnics, 12\n",
+ "Longest word present: straightjacketing, 17 letters\n",
+ "Longest word absent: grandiloquence, 14 letters\n",
+ "115 unused letters\n",
+ "Longest makeable word: multivitamins, 13\n",
"\n",
"wordsearch06.txt\n",
- "Longest word present: playwrights, 11 letters\n",
- "Longest word absent: conglomerations, 15 letters\n",
- "137 unused letters\n",
- "Longest makeable word: conglomerations, 15\n",
+ "Longest word present: inflorescence, 13 letters\n",
+ "Longest word absent: extinguished, 12 letters\n",
+ "159 unused letters\n",
+ "Longest makeable word: convocations, 12\n",
"\n",
"wordsearch07.txt\n",
- "Longest word present: negotiations, 12 letters\n",
- "Longest word absent: electroplating, 14 letters\n",
- "110 unused letters\n",
- "Longest makeable word: electroplating, 14\n",
+ "Longest word present: hypothesising, 13 letters\n",
+ "Longest word absent: nonrenewable, 12 letters\n",
+ "127 unused letters\n",
+ "Longest makeable word: nonrenewable, 12\n",
"\n",
"wordsearch08.txt\n",
- "Longest word present: schoolhouses, 12 letters\n",
- "Longest word absent: tonsillectomies, 15 letters\n",
- "129 unused letters\n",
- "Longest makeable word: tonsillectomies, 15\n",
+ "Longest word present: misrepresents, 13 letters\n",
+ "Longest word absent: predominates, 12 letters\n",
+ "125 unused letters\n",
+ "Longest makeable word: predominates, 12\n",
"\n",
"wordsearch09.txt\n",
- "Longest word present: ecumenically, 12 letters\n",
- "Longest word absent: vulgarisation, 13 letters\n",
- "136 unused letters\n",
- "Longest makeable word: vulgarisation, 13\n",
+ "Longest word present: counterattacks, 14 letters\n",
+ "Longest word absent: overstepping, 12 letters\n",
+ "125 unused letters\n",
+ "Longest makeable word: constituents, 12\n",
"\n",
"wordsearch10.txt\n",
- "Longest word present: cosmological, 12 letters\n",
- "Longest word absent: flabbergasting, 14 letters\n",
- "115 unused letters\n",
- "Longest makeable word: perversions, 11\n",
+ "Longest word present: cheerlessness, 13 letters\n",
+ "Longest word absent: gregariously, 12 letters\n",
+ "142 unused letters\n",
+ "Longest makeable word: gregariously, 12\n",
"\n",
"wordsearch11.txt\n",
- "Longest word present: penultimates, 12 letters\n",
- "Longest word absent: slaughterhouses, 15 letters\n",
- "122 unused letters\n",
- "Longest makeable word: unfriendliness, 14\n",
+ "Longest word present: petitioners, 11 letters\n",
+ "Longest word absent: overdosing, 10 letters\n",
+ "137 unused letters\n",
+ "Longest makeable word: needlessly, 10\n",
"\n",
"wordsearch12.txt\n",
- "Longest word present: unintelligibly, 14 letters\n",
- "Longest word absent: equestriennes, 13 letters\n",
- "124 unused letters\n",
- "Longest makeable word: unresponsive, 12\n",
+ "Longest word present: propagandises, 13 letters\n",
+ "Longest word absent: fluorescent, 11 letters\n",
+ "130 unused letters\n",
+ "Longest makeable word: fluorescent, 11\n",
"\n",
"wordsearch13.txt\n",
- "Longest word present: fearlessness, 12 letters\n",
- "Longest word absent: impoverishing, 13 letters\n",
- "130 unused letters\n",
- "Longest makeable word: impoverishing, 13\n",
+ "Longest word present: preregisters, 12 letters\n",
+ "Longest word absent: undergrowth, 11 letters\n",
+ "113 unused letters\n",
+ "Longest makeable word: undergrowth, 11\n",
"\n",
"wordsearch14.txt\n",
- "Longest word present: separations, 11 letters\n",
- "Longest word absent: perambulated, 12 letters\n",
- "159 unused letters\n",
- "Longest makeable word: perambulated, 12\n",
+ "Longest word present: dispossessing, 13 letters\n",
+ "Longest word absent: sweatshirts, 11 letters\n",
+ "116 unused letters\n",
+ "Longest makeable word: sweatshirts, 11\n",
"\n",
"wordsearch15.txt\n",
- "Longest word present: undisciplined, 13 letters\n",
- "Longest word absent: noncontagious, 13 letters\n",
- "128 unused letters\n",
- "Longest makeable word: noncontagious, 13\n",
+ "Longest word present: retrenching, 11 letters\n",
+ "Longest word absent: quadruples, 10 letters\n",
+ "119 unused letters\n",
+ "Longest makeable word: cavillings, 10\n",
"\n",
"wordsearch16.txt\n",
- "Longest word present: intergalactic, 13 letters\n",
- "Longest word absent: beautification, 14 letters\n",
- "107 unused letters\n",
- "Longest makeable word: pharmacopeias, 13\n",
+ "Longest word present: cantankerously, 14 letters\n",
+ "Longest word absent: amorphousness, 13 letters\n",
+ "101 unused letters\n",
+ "Longest makeable word: amorphousness, 13\n",
"\n",
"wordsearch17.txt\n",
- "Longest word present: undershirts, 11 letters\n",
- "Longest word absent: photographing, 13 letters\n",
- "138 unused letters\n",
- "Longest makeable word: photographing, 13\n",
+ "Longest word present: appreciating, 12 letters\n",
+ "Longest word absent: unreasoning, 11 letters\n",
+ "114 unused letters\n",
+ "Longest makeable word: unreasoning, 11\n",
"\n",
"wordsearch18.txt\n",
- "Longest word present: humanitarians, 13 letters\n",
- "Longest word absent: environmentalists, 17 letters\n",
- "120 unused letters\n",
- "Longest makeable word: proportionality, 15\n",
+ "Longest word present: rehabilitates, 13 letters\n",
+ "Longest word absent: interlarding, 12 letters\n",
+ "135 unused letters\n",
+ "Longest makeable word: interlarding, 12\n",
"\n",
"wordsearch19.txt\n",
- "Longest word present: regurgitates, 12 letters\n",
- "Longest word absent: unsatisfactory, 14 letters\n",
- "122 unused letters\n",
- "Longest makeable word: unsatisfactory, 14\n"
+ "Longest word present: predetermines, 13 letters\n",
+ "Longest word absent: prosperously, 12 letters\n",
+ "127 unused letters\n",
+ "Longest makeable word: kneecapping, 11\n"
]
}
],