TMC #0015: Turing Test: Imitation Game Simulator
A pure-Python simulation of Turing's 1950 imitation game: a rule-based chatbot and scripted human compete across a 20-question bank, scored by a heuristic interrogator that awards rounds based on answer plausibility.
Turing's 1950 paper replaced "can machines think?" with a concrete game: fool a human interrogator. This project implements that game as a runnable experiment.
What It Includes
RuleBasedChatbot: A keyword-matching machine player with 18 response rules covering all major question categories: arithmetic, creative writing, chess, philosophy, introspection, and opinion. Responses are calibrated to sound human: evasive on hard questions, specific on easy ones.
ScriptedHuman: A scripted human baseline with natural, idiosyncratic answers including hesitation markers, personal anecdotes, and deliberate inconsistencies: the kind of response a real person gives rather than an information-retrieval system.
run_game: The interrogation loop: 20 questions from Turing's own examples and extensions, scored by a heuristic judge that awards rounds based on specificity, length, and plausibility (with a random element to simulate interrogator uncertainty).
Scoring analysis: Prints each question, both responses (truncated to 80 chars), the judge's verdict, and a final pass/fail based on whether the machine wins more rounds than the human.
Running It
python turing_test_sim.py # full 20-question game
python turing_test_sim.py --demo basic # 5-question demo
No external dependencies: pure Python 3.10+.