Kitāb al-Ḥiyāl

كتاب الحيل

This mechanical card game is crafted for larger screens — its intricate automata require the space of a proper workshop.

🖥️

Please visit on a laptop or desktop computer to experience al-Jazarī's ingenious devices.

A solitaire card game inspired by the Book of Ingenious Devices, 1206 CE

← Return to lldincardona.com

The Book of Ingenious Devices

Select Difficulty

3.0 — LLDI & Claude Opus 4.6 · Music by Suno 4.5 · Images by Midjourney
Turn0
Tigris0
Well0/25
Devices0/50
The Tigris الدجلة
Draw pile 0
Channel القناة
The Well البئر0/25
Game Log
Clocks Vessels Basins Fountains Machines Locks

How to Play

The Historical Inspiration

Badīʿ al-Zamān Abū al-ʿIzz ibn Ismāʿīl al-Jazarī (1136–1206 CE) was a polymath, inventor, mechanical engineer, craftsman, and artist who served as chief engineer at the Artuqid palace in Diyarbakır, in what is now southeastern Turkey. In 1206, he completed his masterwork: The Book of Knowledge of Ingenious Mechanical Devices (كتاب في معرفة الحيل الهندسية), documenting 50 mechanical devices he had designed and built over 25 years of service to three successive sultans.

His inventions — including the first known programmable automaton (the Castle Clock), the camshaft, the crankshaft, and the segmental gear — were centuries ahead of their time. Many are considered foundational to modern mechanical engineering. Al-Jazarī's work bridges the ancient world and the Renaissance, representing the pinnacle of Islamic Golden Age engineering.

Kitāb al-Ḥiyāl (كتاب الحيل) brings these 50 devices to life as a solitaire card game. Each card represents one of al-Jazarī's actual machines, organized into the same six categories as the original treatise. The game's chain reaction mechanic — where one device triggers the next — mirrors the interconnected gears and water flows of al-Jazarī's automata.

═══ ✧ ═══

Your Mission

You are al-Jazarī himself. The Sultan has commissioned you to document and build all 50 mechanical devices before your resources run dry. Water flows, gears turn, time presses.

═══ ✧ ═══

The Deck — 78 Cards

═══ ✧ ═══

Controls

═══ ✧ ═══

Each Turn — The Water Cycle

  1. Flow (Draw) — Draw 3 cards from the Tigris. Choose 1 to play. The other 2 are discarded to the Well. An instruction banner tells you what to do next.
  2. Build (Place) — Place your chosen card:
    • Device cards must go on the Path matching their category
    • Force cards go to the Channel (your resource reserve)
    • Ingenuity cards can be played for their effect or stored in the Channel
  3. Power — The placed device's special power activates automatically.
  4. Chain Reaction — If the device has a Trigger and its condition is met, an automatic chain fires! Chains can cascade up to 3 times per turn.
  5. Well Check — If the Well exceeds its limit (25/28/30 depending on difficulty), the game is immediately lost.
═══ ✧ ═══

Feeding Devices — Layers & Forces

Each Device has a Layer (1–5), shown as dots on the card. Layer 1 devices can be placed for free. Layer 2+ devices must be "fed" — you must also play a matching Force card alongside them. The Force card shown on each device tells you what type is required.

Placement rule: A device can be placed on a Path if the Path is empty, or the device's layer is at most 1 higher than the top card. Force cards used to feed a device are consumed and sent to the Well.

═══ ✧ ═══

The Channel — Your Resource Reserve

Force cards stored in the Channel can be spent to feed devices. When a Force is used — whether from the Channel or your hand — it is removed and sent to the Well. Ingenuity cards in the Channel serve as wild forces (substituting for any type) but are also consumed and sent to the Well when used.

Spending priority: The game always uses wildcards first — metamorphed forces, then Ingenuity cards, then exact force matches. This preserves your specific forces for when you truly need them. The Channel also provides conditions for chain reaction triggers (e.g., "≥1 Water in Channel").

Running Water

Once per turn, instead of drawing from the Tigris, you may take the top card of the Well. This replaces the entire draw phase for that turn. Penalty: the top card of the Tigris is immediately sent to the Well. Use wisely!

Chain Reactions — The Heart of Kitāb al-Ḥiyāl

About 20 devices have Triggers (shown with ). When you place such a device and its condition is met (e.g., "≥1 Water in Channel"), a chain reaction fires automatically — placing another device, drawing cards, or removing cards from the Well. If that device also has a trigger, the chain continues! Maximum 3 chain activations per turn.

Powers

Every device has a Power that activates when placed: Layer 1 powers are simple (draw extra, peek), Layer 3 powers are strong (retrieve from Well), and Layer 5 Masterpieces have legendary effects like emptying the Well entirely or drawing 4 cards per turn forever.

═══ ✧ ═══

Victory — الكتاب تمّ

Victory conditions depend on difficulty:

Even partial completion earns titles:

Completing Masterpieces and long chains add bonus points. Expected full victory rate: ~8–12% for experienced players.

Defeat — نضب الماء

You lose if the Well exceeds its limit (Easy: 30, Medium: 28, Hard: 25), or if the Tigris is empty with no legal moves remaining.

Menu

Digging — Pick a Card

Click a card to take it into your hand.