Start here ZIP · 6.57 MB
Complete companion
Chapter modules, all 23 notebooks, extension laboratories, supplied data, exercises and selected worked answers.
Download complete packageThe book & Python companion
Models, Experiments, and Exercises with Python
Explore consciousness through computational models you can inspect, change and test.
Release 2026.11.03 Python 3.12 Runs locally
Forthcoming from World Scientific
Series on Machine Consciousness
The question behind the code
What does a machine do, and what would justify saying more?
How does a system select information, remember an instruction or assess its own uncertainty?
Programming Consciousness? approaches these questions through small Python models, controlled interventions and comparisons with rival explanations. Eighteen chapters connect perception, attention, memory and self-modeling with cognitive architectures, contemporary AI and responsible research.
Predict an outcome, inspect the mechanism, change an assumption and explain what the result supports. Most laboratories are controlled simulations; two analyse published human decisions and recorded software-agent runs.
Advanced undergraduate and graduate students in engineering and related fields who already know Python. Basic NumPy, probability, statistics and matrix operations are useful; no prior course in philosophy of mind or neuroscience is required.
A path through the subject
From a first inspectable model to an integrated architecture. Open a chapter to see its focus.
Showing all 18 chapters
Use explicit state, preserved traces and controlled changes to turn a Python program into an inspectable experiment.
Distinguish access, report and subjective experience, and clarify what a computational model can claim about each.
Translate theoretical questions into predictions, controls and planned analyses while examining assumptions built into synthetic data.
Use signal detection and psychometric models to separate sensory evidence, response criterion, decisions and visibility reports.
Compare selection mechanisms on shared inputs to examine competition, capacity and the difference between priority and task success.
Investigate recurrent dynamics and compare them with feedforward alternatives that receive the same observation history.
Build a limited workspace and compare broadcasting, selective routing and local communication under explicit delivery budgets.
Model admission, maintenance and retrieval in working memory, and test how interference and decision rules affect delayed performance.
Separate decisions, confidence and control through synthetic experiments and held-out analyses of published human confidence reports.
Enumerate small Boolean networks to distinguish entropy, dependence, causal influence and a precisely defined partition-loss statistic.
Build a Bayesian filter, compare predictive baselines and examine how assumptions and information leakage change apparent forecasting success.
Test when a model of a selector’s errors changes action, using matched sensing budgets and a simpler rival controller.
Model a situated agent whose resource needs guide action, and examine the functional roles of regulation and affect-like signals.
Compare verbal and nonverbal representations to test when an internal trace contributes to action and when it merely records it.
Explore neural computation, attention and agent boundaries through small programs, recorded software-agent runs and an optional pretrained-model probe.
Compare explicit models through predictions, selective interventions and independent synthetic observations, allowing ties and shared failures.
Examine human responsibility, research safeguards and uncertainty about artificial welfare through an inspectable teaching protocol.
Integrate mechanisms in a seven-module architecture, test a viable rival and evaluate bounded policy revision under distribution shift.
The five themes above are a browsing guide. Chapter titles follow the book.
Teaching a course? Appendix E provides a twelve-week route with 36 core tasks.
Bring the laboratory with you
Release 2026.11.03
Choose the complete package, or the interface you prefer.
Start here ZIP · 6.57 MB
Chapter modules, all 23 notebooks, extension laboratories, supplied data, exercises and selected worked answers.
Download complete packageScripts ZIP · 1.93 MB
Runnable Python modules, required data and helpers, plus teaching materials. A direct route from the terminal.
Download Python packageInteractive records ZIP · 2.85 MB
All 23 notebooks with the code and data they need. Inspect a run, restart the kernel and make your own experiment.
Download notebook packageRequired calculations run locally with Python and NumPy on ordinary CPU hardware. No paid service, GPU or physical robot is required. The optional pretrained-model probe uses separate dependencies and a weights download; saved outputs are included. Source conditions and data attribution accompany the materials.
A first experiment
Use Python 3.12 and the companion release that matches your edition. Extract the archive, keep its folder structure intact and open a terminal in the extracted companion directory.
Begin with the release README. A virtual environment keeps the laboratory dependencies together.
Use python3 instead of python if that is how Python 3.12 is installed on your system.
python -m venv .venvsource .venv/bin/activate.venv\Scripts\Activate.ps1If your system prevents script activation, use .venv\Scripts\python.exe in place of python in the commands below.
python -m pip install -r requirements.txtpython ch01.py
python run_all.pyCompare the trace with your prediction. Preserve the original result before changing a model, and record the release and environment used.
Install the notebook dependencies in the same environment:
python -m pip install -r requirements-notebooks.txtUse the Jupyter interface adopted by your course and select this Python environment. Open chapter notebooks from the companion directory and extension notebooks from their own folder. Restart the kernel and run cells in order.
Keep the record clear
No errata entries recorded yet for release 2026.11.03.
Check corrections against the edition and companion release you are using. The downloadable register provides a consistent place to track confirmed corrections.
Include the chapter and section or exercise number, the companion release, and a minimal example. For code, include the Python version, expected result and observed output.
Email Antonio Chella