🇮🇱 גרסה עברית: README.md
A fake "AI chatbot" and an unbeatable Tic-Tac-Toe game that run entirely inside Microsoft Word — using nothing but AutoCorrect. No internet, no add-ins, no macros required at runtime.
Tom Riddle is a prank. To an audience it looks like Word is talking back to you and playing games. In reality, every "reply" is just an AutoCorrect replacement that Word swaps in as you type. It even works on a fully offline / locked-down machine.
🤫 The whole trick is that it's not AI. If you're performing it, don't tell your audience how it works — none of the built-in responses give it away.
- 💬 ~280 chat sentences — type natural Hebrew sentences ("מה נשמע", "מי אתה", "ספר לי בדיחה", "אני עצוב"...) and get replies that sound like a real assistant.
- ❓ Follow-up questions — "בוא נשחק" asks whether you want to play (yes/no), riddles reveal their answer on request, and every finished game offers a rematch.
- 🎮 Full Tic-Tac-Toe against a perfect (unbeatable) computer — all 1,120 reachable board states are pre-computed. Best you can do is a draw.
- 🌐 100% offline & local. Works with network/macros blocked.
- ↩️ Clean uninstall that restores Word exactly.
- 🖱️ One-click installer (
.vbs) or manual import (.bas).
- Download the repo (Code → Download ZIP) and unzip.
- Double-click
easy-install/Install-TomRiddle.vbs. - A popup says "תום רידל מוכן!" — you're done.
The script automates Word to add the entries. Windows or antivirus may ask you to confirm running a script — that's expected. If scripts are blocked on your machine, use Option B.
- Open Word → press Alt + F11 (VBA editor).
- File → Import File… → choose
src/TomRiddle_Setup.bas. - Press F5 → run
TomRiddle_Install.
⚠️ Import the.basfile — do not copy-paste it into the code window (the firstAttribute VB_Nameline will cause a Syntax error).
Type the phrase, then a space, and Word replaces it.
Chat — try:
מה נשמע— small talkמי אתה/איך קוראים לך— identityספר לי בדיחה— a jokeתן חידה— a riddle (typeמה התשובהfor the answer)אני עצוב— empathy mode
(Full list: docs/replacements.txt)
Tic-Tac-Toe:
- Type
בוא נשחק→ it says Tic-Tac-Toe is all it knows for now and asks if you want to play. Typeכן(orיאללה/בטח) and a space → a board (a real table) appears. You are X, the computer is O. - Each turn: at the end of the "המהלך שלך הוא- " line, type just the cell digit (as shown on the board) and a space — the next board appears by itself. No codes, nothing to remember.
- When a game ends it offers a rematch —
כן+ space opens a fresh board. - What you type after a question/board may not show on screen — that's intentional.
- Typed a wrong digit (occupied cell)? Backspace and type again. Always a space, never Enter.
Your audience sees a live conversation, boards appearing "on their own", and the "AI" winning. 😈
Word's AutoCorrect replaces text as you type. Tom Riddle registers a large set of formatted replacements: fixed phrases for chat, and a real-table board per game state. Because AutoCorrect is stateless, every board plants a hidden token (Hidden-formatted text) at the end of its "המהלך שלך הוא- " line, encoding the whole game so far; the digit you type joins it to form the next board's trigger. Word's matcher reads the document text — hidden runs and the space left by the previous fire included — so the chain sustains itself.
Three non-obvious quirks this project works around:
- Formatted entries are global. Plain-text entries live in per-language lists, and entries added via automation land in a list your typing may never consult — so everything here is a formatted entry (which also lifts the 255-char value cap).
- Loop prevention. Word won't apply a replacement whose result contains its own trigger — so each board's new token encodes the history reversed, guaranteeing the trigger that just fired never appears in the result.
- A table inserted mid-line swallows the text before it — so every board value starts with a paragraph mark.
- One click: double-click
easy-install/Uninstall-TomRiddle.vbs. - Manual: import
src/TomRiddle_Remove.basand runTomRiddle_Uninstall.
Both remove every Tom Riddle entry (plus a safety sweep of anything left over) and leave your AutoCorrect exactly as it was.
Everything is generated by one script:
python3 generate_tomriddle.pyEdit the CHAT list inside it to add or change responses, then re-run to regenerate
the .bas and .vbs files. The Tic-Tac-Toe tree (perfect play via minimax) and all
Hebrew text (encoded as ChrW code points so the source stays pure ASCII) are built
automatically.
- Tom Riddle only edits your AutoCorrect entries; the uninstaller reverts them.
- Boards are real Word tables (formatted AutoCorrect entries) — red X, blue O, real borders. Looks great in any font; no document setup needed.
- Install takes ~3-4 minutes (~1,430 formatted entries get registered) and ends with a popup reporting how many boards were saved. Uninstall is fast.
- This is a toy/prank. Use it to have fun. 🙂
MIT — see LICENSE.