Skip to content

Instantly share code, notes, and snippets.

class LogicBingo
attr_accessor :state, :filled_cells_count, :bingo_cells
def self.go() self.new.exhaustive_search; end
# 0 1 2 3 4
# 0 a1 b1 c1 d1 e1
# 1 a2 b2 c2 d2 e2
# 2 a3 b3 c3 d3 e3
# 3 a4 b4 c4 d4 e4
@BeankernelXI
BeankernelXI / alchemist_solver.rb
Last active April 14, 2019 08:30
v1 of a solver for the game "Alchemists"
#call this to put it thru its paces
def test
Solver.new.tap do |s|
s.add(:MUSHROOM, :FERN, Potion::POISON); puts "Adding another hint"
s.add(:FERN, :TOAD, Potion::SPEED); puts "Adding another hint"
s.add(:TOAD, :CLAW, Potion::INSANITY); puts "Adding another hint"
s.add(:CLAW, :FLOWER, Potion::SPEED); puts "Adding another hint"
s.add(:FLOWER, :ROOT, Potion::WATER); puts "Adding another hint"
s.add(:ROOT, :SCORPION, Potion::PARALYSIS); puts "Adding another hint"