A comprehensive collection of computational models and visualizations exploring the theoretical foundations of perception, motor control, and probabilistic reasoning in biological and artificial systems.
This repository contains interactive Jupyter notebooks that demonstrate key concepts in:
- Motor Control Theory - How the brain plans and executes movements
- Probabilistic Reasoning - Bayesian inference and uncertainty quantification
- Predictive Coding - How the brain predicts and processes sensory information
- Optimal Control - Mathematical principles underlying efficient movement
Comprehensive overview of motor control theories
- Hierarchical control models (Strategic ? Tactical ? Execution)
- Forward and inverse models for motor prediction
- Optimal control theory and cost functions
- Motor program theory and dynamical systems
- Interactive visualizations of brain-body control loops
Mathematical analysis of smooth movement trajectories
- Derivation of minimum jerk principle: minimizing ?(d³x/dt³)² dt
- Fifth-order polynomial solutions for optimal trajectories
- Comparison with human movement data
- Energy efficiency and smoothness trade-offs
- Applications to robotics and prosthetics
Analysis of motor variability and noise
- Signal-dependent noise in motor execution
- Distance-accuracy relationships (Fitts' Law)
- Stochastic optimal control under uncertainty
- Noise propagation through motor hierarchies
Interactive exploration of Bayesian reasoning
- Visual derivations of Bayes' theorem
- Medical diagnosis examples (false positive paradox)
- Prior-likelihood-posterior relationships
- Applications to perception and decision making
Foundational probability concepts with visualizations
- Venn diagrams for event relationships
- Conditional probability P(A|B) = P(A?B)/P(B)
- Independence vs dependence testing
- Real-world examples and intuitive explanations
Focused exploration of conditional reasoning
- Visual representation of conditional spaces
- "Shrinking the universe" concept
- Applications to perceptual inference
Discrete probability distributions and their applications
- Binomial distribution derivation and properties
- Success/failure modeling in biological systems
- Connection to neural spike trains and decision making
Comparison of two major theories of neural computation
Predictive Coding:
- Hierarchical prediction error minimization
- Kalman filter implementations
- Top-down predictions vs bottom-up sensory input
- Applications to perception and motor control
Probability Coding:
- Neural populations representing probability distributions
- Bayesian brain hypothesis
- Uncertainty quantification in neural circuits
- Optimal inference under noise
pip install numpy matplotlib seaborn scipy pandas jupyter
- Python 3.8+
- Jupyter Notebook or JupyterLab
- Virtual environment recommended
git clone https://github.com/yourusername/modeling-of-perception-and-action.git
cd modeling-of-perception-and-action
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
jupyter notebook
- Optimal Control Theory: Cost function minimization for movement planning
- Bayesian Inference: P(hypothesis|evidence) = P(evidence|hypothesis) × P(hypothesis) / P(evidence)
- Kalman Filtering: Optimal state estimation under uncertainty
- Information Theory: Entropy, mutual information, and neural coding
- Motor Control Hierarchy: Strategic ? Tactical ? Execution levels
- Predictive Processing: Brain as prediction machine minimizing surprise
- Neural Coding: How populations of neurons represent information
- Sensorimotor Integration: Combining prediction with sensory evidence
- Robotics: Trajectory planning and control algorithms
- Prosthetics: Brain-computer interfaces and motor decoding
- Machine Learning: Bayesian neural networks and uncertainty quantification
- Cognitive Science: Models of human perception and decision making
All notebooks include:
- Interactive plots with matplotlib and seaborn
- Mathematical derivations with step-by-step explanations
- Real-world examples connecting theory to applications
- Comparative analyses between different theoretical approaches
- Parameter exploration to understand model behavior
These notebooks are designed for:
- Graduate courses in computational neuroscience
- Research training in motor control and perception
- Self-study of probabilistic reasoning and optimal control
- Interdisciplinary learning connecting math, biology, and engineering
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests and documentation
- Submit a pull request
Key papers and textbooks that inform these implementations:
- Flash, T. & Hogan, N. (1985). The coordination of arm movements: an experimentally confirmed mathematical model. Journal of Neuroscience
- Todorov, E. (2004). Optimality principles in sensorimotor control. Nature Neuroscience
- Friston, K. (2010). The free-energy principle: a unified brain theory? Nature Reviews Neuroscience
- Wolpert, D.M. & Ghahramani, Z. (2000). Computational principles of movement neuroscience. Nature Neuroscience
MIT License - see LICENSE for details.
"The brain is fundamentally a prediction machine, constantly generating models of the world and updating them based on sensory evidence." - Andy Clark