ambuscader     /    3 = CRAB  / MEDUSA
anagrams       /    1 = ARMS  / NAGA
braiding       /    1 = BIRD  / AGNI
comparative    /    4 = COAT  / VAMPIRE
crowings       /    5 = WINGS / ROC
handsome       /    1 = ASH   / DEMON
hayriders      /    1 = RISE  / HYDRA
honeytraps     /    2 = STONE / HARPY
misdemeanor    /    1 = NOSE  / MERMAID
releafing      /    4 = FIRE  / ANGEL
shakerlike     /    4 = HARK  / SELKIE
tougheners     /    5 = HORSE / TENGU
unchartered    /    1 = HERD  / CENTAUR
xenophobia     /    3 = BOA   / PHOENIX

Seeing her turns onlookers to ___
honeytraps     /    2 = STONE / HARPY
ambuscader     /    3 = CRAB / MEDUSA

On Warsaw's coat of ___
anagrams       /    1 = ARMS / NAGA
misdemeanor    /    1 = NOSE / MERMAID

Japanese heavenly dog with a long ___
misdemeanor    /    1 = NOSE / MERMAID
tougheners     /    5 = HORSE / TENGU

A giant ___ helped this many-headed serpent
ambuscader     /    3 = CRAB / MEDUSA
hayriders      /    1 = RISE / HYDRA

Charles Wesley's 1739 song about several of this messenger begins: "___, the..."
"Hark! The Herald Angels" (src)
shakerlike     /    4 = HARK / SELKIE
releafing      /    4 = FIRE / ANGEL

Some of this kind of creature entered a ___ of pigs in Matthew 8:30-32
unchartered    /    1 = HERD / CENTAUR
handsome       /    1 = ASH / DEMON

Woman with ___ instead of arms
crowings       /    5 = WINGS / ROC
honeytraps     /    2 = STONE / HARPY

Has the lower body of a ___
tougheners     /    5 = HORSE / TENGU
unchartered    /    1 = HERD / CENTAUR

Huge Indian snake; specifically cobra, neither python nor ___ constrictor
xenophobia     /    3  = BOA / PHOENIX
anagrams       /    1 = ARMS / NAGA

Enormous Arabian ___ of prey
braiding       /    1 = BIRD / AGNI
crowings       /    5 = WINGS / ROC

Vedic entity, name meaning ___, with two kindling sticks for parents
releafing      /    4 = FIRE / ANGEL
braiding       /    1 = BIRD / AGNI

Avian reborn from the ___es
handsome       /    1 = ASH / DEMON
xenophobia     /    3  = BOA / PHOENIX

To create this bloodsucker is to ___ it
hayriders      /    1 = RISE / HYDRA
comparative    /    4 = COAT / VAMPIRE

Wearing a sealskin ___ allows it to transform
comparative    /    4 = COAT / VAMPIRE
shakerlike     /    4 = HARK / SELKIE

In [9]:
import forge
from puzzle.puzzlepedia import puzzlepedia

puzzle = puzzlepedia.parse("""
@ 3 1 1 4 5 1 1 2 1 4 4 5 1 3
* CRAB
* ARMS
* BIRD
* COAT
* WINGS
* ASH
* RISE
* STONE
* NOSE
* FIRE
* HARK
* HORSE
* HERD
* BOA
""", hint='acrostic')

In [10]:
import forge
from puzzle.puzzlepedia import puzzlepedia

puzzle = puzzlepedia.parse("""
CRAB
ARMS
BIRD
COAT
WINGS
ASH
RISE
STONE
NOSE
FIRE
HARK
HORSE
HERD
BOA
""", hint='acrostic')


ERROR:root:An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line string', (1, 0))

---------------------------------------------------------------------------
KeyboardInterrupt                         Traceback (most recent call last)
<ipython-input-10-ffd41305bec9> in <module>()
     17 HERD
     18 BOA
---> 19 """, hint='acrostic')

/Users/philharnish/Projects/forge/src/puzzle/puzzlepedia/puzzlepedia.py in parse(source, hint, threshold)
      9   _init()
     10   result = puzzle.Puzzle('first stage', source, hint=hint, threshold=threshold)
---> 11   interact_with(result)
     12   return result
     13 

/Users/philharnish/Projects/forge/src/puzzle/puzzlepedia/puzzlepedia.py in interact_with(puzzle)
     15 def interact_with(puzzle):
     16   _init()
---> 17   display.display(puzzle_widget.PuzzleWidget(puzzle))
     18 
     19 

/Users/philharnish/Projects/forge/src/puzzle/puzzlepedia/puzzle_widget.py in PuzzleWidget(puzzle)
      8   widget_children = []
      9   for problem in puzzle._meta_problems:
---> 10     widget_children.append(problem_widget.ProblemWidget(problem))
     11   accordion = widgets.Accordion(children=widget_children)
     12   for i, problem in enumerate(puzzle._meta_problems):

/Users/philharnish/Projects/forge/src/puzzle/puzzlepedia/problem_widget.py in ProblemWidget(meta_problem)
     34   if meta_problem.peek():
     35     _update_solutions_for_problem(
---> 36         solutions_table, best_solution, meta_problem.peek())
     37   return widgets.VBox([widgets.HBox(items), solutions_table])
     38 

/Users/philharnish/Projects/forge/src/puzzle/puzzlepedia/problem_widget.py in _update_solutions_for_problem(table, best_solution, problem)
     39 
     40 def _update_solutions_for_problem(table, best_solution, problem):
---> 41   solutions = problem.solutions()
     42   if solutions.peek():
     43     best_solution.value = solutions.peek()

/Users/philharnish/Projects/forge/src/puzzle/problems/problem.py in solutions(self)
     42 
     43   def solutions(self):
---> 44     for _ in self._filtered_solutions_iterator:
     45       # Exhaust the _filtered_solutions_iterator.
     46       pass

/Users/philharnish/Projects/forge/src/puzzle/problems/problem.py in _filter_solutions_iter(self)
     62     # the Problem's constraints changed mid-solve.
     63     for k, v in itertools.chain(
---> 64         self._all_solutions.items(), self._solutions_iterator):
     65       constrained = all(fn(k, v) for fn in self._constraints)
     66       if constrained:

/Users/philharnish/Projects/forge/src/puzzle/problems/problem.py in _take_solutions_iter(self)
     54 
     55   def _take_solutions_iter(self):
---> 56     for k, v in self._solve_iter():
     57       self._all_solutions[k] = v
     58       yield k, v

/Users/philharnish/Projects/forge/src/puzzle/problems/acrostic_problem.py in _solve_iter(self)
     42 
     43   def _solve_iter(self):
---> 44     for solution, weight in self._acrostic.items():
     45       if weight < self._threshold:
     46         return

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in items(self)
     39 
     40   def items(self):
---> 41     for phrase, weight in self._walk_phrase_graph_from(0, [], 0):
     42       yield phrase, weight
     43 

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_search.py in _walk_phrase_graph_from(self, pos, acc, acc_weight)
     30         best_phrase = heap.pop()
     31         yield from self._recurse_with(
---> 32             pos, acc, acc_weight, target, best_phrase, best_weight)
     33         best_weight = heap.best_weight()
     34     while len(heap):

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _recurse_with(self, pos, acc, acc_weight, target, phrase, weight)
     57       interesting = (acc_len < 3) or (pos / acc_len >= _TARGET_WORD_LEN)
     58       if interesting:
---> 59         for result in self._walk_phrase_graph_from(pos, acc, acc_weight):
     60           # Forward any findings from recursive calls up the trampoline.
     61           yield result

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_search.py in _walk_phrase_graph_from(self, pos, acc, acc_weight)
     30         best_phrase = heap.pop()
     31         yield from self._recurse_with(
---> 32             pos, acc, acc_weight, target, best_phrase, best_weight)
     33         best_weight = heap.best_weight()
     34     while len(heap):

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _recurse_with(self, pos, acc, acc_weight, target, phrase, weight)
     57       interesting = (acc_len < 3) or (pos / acc_len >= _TARGET_WORD_LEN)
     58       if interesting:
---> 59         for result in self._walk_phrase_graph_from(pos, acc, acc_weight):
     60           # Forward any findings from recursive calls up the trampoline.
     61           yield result

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_search.py in _walk_phrase_graph_from(self, pos, acc, acc_weight)
     30         best_phrase = heap.pop()
     31         yield from self._recurse_with(
---> 32             pos, acc, acc_weight, target, best_phrase, best_weight)
     33         best_weight = heap.best_weight()
     34     while len(heap):

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _recurse_with(self, pos, acc, acc_weight, target, phrase, weight)
     57       interesting = (acc_len < 3) or (pos / acc_len >= _TARGET_WORD_LEN)
     58       if interesting:
---> 59         for result in self._walk_phrase_graph_from(pos, acc, acc_weight):
     60           # Forward any findings from recursive calls up the trampoline.
     61           yield result

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_search.py in _walk_phrase_graph_from(self, pos, acc, acc_weight)
     30         best_phrase = heap.pop()
     31         yield from self._recurse_with(
---> 32             pos, acc, acc_weight, target, best_phrase, best_weight)
     33         best_weight = heap.best_weight()
     34     while len(heap):

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _recurse_with(self, pos, acc, acc_weight, target, phrase, weight)
     57       interesting = (acc_len < 3) or (pos / acc_len >= _TARGET_WORD_LEN)
     58       if interesting:
---> 59         for result in self._walk_phrase_graph_from(pos, acc, acc_weight):
     60           # Forward any findings from recursive calls up the trampoline.
     61           yield result

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_search.py in _walk_phrase_graph_from(self, pos, acc, acc_weight)
     19     remaining_distance = target - pos
     20     heap = max_heap.MaxHeap()
---> 21     for phrase, weight in self._phrases_at(pos):
     22       phrase_len = len(phrase)
     23       scale = phrase_len / remaining_distance  # n / target : {0 < scale <= 1}.

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _phrases_at(self, pos)
     74     phrases_at = self._phrase_graph[pos]
     75     # Exhaust known phrases first.
---> 76     for phrase in self._iter_phrases(phrases_at):
     77       yield phrase
     78     # Then find more.

/Users/philharnish/Projects/forge/src/puzzle/heuristics/acrostics/_acrostic_iter.py in _iter_phrases(self, phrases)
    123         item, weight = next_best_tuple
    124         cache[cache_id] = (next_best_tuple, best_items)
--> 125         heapq.heapreplace(best_phrases, (-weight, cache_id))
    126 
    127 

KeyboardInterrupt: 

In [11]:
import forge
from puzzle.puzzlepedia import puzzlepedia

puzzle = puzzlepedia.parse("""
ta
an
ne
ar
ke
ha
st
eh
aa
bs
eb
aa
at
tk
""", hint='acrostic')

T honeytraps / 2 = STONE / HARPY A ambuscader / 3 = CRAB / MEDUSA

A ambuscader / 3 = CRAB / MEDUSA R hayriders / 1 = RISE / HYDRA

R hayriders / 1 = RISE / HYDRA T comparative / 4 = COAT / VAMPIRE

T comparative / 4 = COAT / VAMPIRE K shakerlike / 4 = HARK / SELKIE

K shakerlike / 4 = HARK / SELKIE E releafing / 4 = FIRE / ANGEL

E releafing / 4 = FIRE / ANGEL B braiding / 1 = BIRD / AGNI

B braiding / 1 = BIRD / AGNI S crowings / 5 = WINGS / ROC

S crowings / 5 = WINGS / ROC T honeytraps / 2 = STONE / HARPY

A anagrams / 1 = ARMS / NAGA N misdemeanor / 1 = NOSE / MERMAID

N misdemeanor / 1 = NOSE / MERMAID E tougheners / 5 = HORSE / TENGU

E tougheners / 5 = HORSE / TENGU H unchartered / 1 = HERD / CENTAUR

H unchartered / 1 = HERD / CENTAUR A handsome / 1 = ASH / DEMON

A handsome / 1 = ASH / DEMON A xenophobia / 3 = BOA / PHOENIX

A xenophobia / 3 = BOA / PHOENIX A anagrams / 1 = ARMS / NAGA

B braiding / 1 = BIRD / AGNI E releafing / 4 = FIRE / ANGEL H unchartered / 1 = HERD / CENTAUR A handsome / 1 = ASH / DEMON T honeytraps / 2 = STONE / HARPY R hayriders / 1 = RISE / HYDRA A ambuscader / 3 = CRAB / MEDUSA N misdemeanor / 1 = NOSE / MERMAID A anagrams / 1 = ARMS / NAGA A xenophobia / 3 = BOA / PHOENIX S crowings / 5 = WINGS / ROC K shakerlike / 4 = HARK / SELKIE E tougheners / 5 = HORSE / TENGU T comparative / 4 = COAT / VAMPIRE


In [16]:
import forge
from puzzle.puzzlepedia import puzzlepedia

puzzle = puzzlepedia.parse("""
* t
* a
* n
* a
* k
* h
* s
* e
* a
* b
* e
* a
* r
* t
""", hint='acrostic')

In [22]:
import forge
from puzzle.puzzlepedia import puzzlepedia

puzzle = puzzlepedia.parse("""
* s
* e
* a
* t
* a
* n
* k
""", hint='acrostic')

In [ ]: