Psychology
  • Rust 98.9%
  • Shell 0.8%
  • Makefile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Peter Lodri 7147f29300
Merge pull request #1 from 8b-is/aye/bridge-count-overflow
Avoid overflow in effect-size sample counts
2026-10-12 13:23:44 +09:00
.github/workflows chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
benches Avoid overflow in effect-size sample counts 2026-10-05 20:07:29 -04:00
docs chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
examples chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
scripts chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
src Avoid overflow in effect-size sample counts 2026-10-05 20:07:29 -04:00
tests chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
.gitignore chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
bench-history.csv chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
Cargo.toml chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
CHANGELOG.md Avoid overflow in effect-size sample counts 2026-10-05 20:07:29 -04:00
CLAUDE.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
CODE_OF_CONDUCT.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
codecov.yml chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
CONTRIBUTING.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
COPYING chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
deny.toml chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
LICENSE chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
Makefile chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
README.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
rust-toolchain.toml chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
SECURITY.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
UPSTREAM.md chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00
VERSION chore: import MacCracken snapshot 2026-08-23 12:34:02 -04:00

Bodh

बोध (Sanskrit: awareness, understanding) — Psychology engine for cognition, perception, learning, and decision-making.

Part of the AGNOS science crate ecosystem.

Key Capabilities

  • Psychophysics: Weber-Fechner law, Stevens' power law, Fitts' law, Hick's law
  • Cognition: Working memory (Baddeley), dual process theory (Kahneman), cognitive load
  • Learning: Ebbinghaus forgetting curve, spaced repetition, Rescorla-Wagner conditioning
  • Decision-making: Prospect theory (Kahneman/Tversky), expected utility, bounded rationality
  • Perception: Signal detection theory (d-prime), Gestalt principles
  • Psychometrics: Cronbach's alpha, split-half reliability, Big Five measurement
  • Development: Piaget stages, Erikson psychosocial stages

Quick Start

use bodh::psychophysics;

// Fitts' law: index of difficulty for a UI target
let id = psychophysics::fitts_law(256.0, 4.0).unwrap();
assert!((id - 7.0).abs() < 1e-10); // 7 bits

// Ebbinghaus forgetting curve
let retention = bodh::learning::ebbinghaus_forgetting(0.0, 1.0).unwrap();
assert!((retention - 1.0).abs() < 1e-10); // perfect at t=0

// Prospect theory value function
let gain = bodh::decision::prospect_theory_value(200.0, 100.0, 0.88, 0.88, 2.25).unwrap();
let loss = bodh::decision::prospect_theory_value(0.0, 100.0, 0.88, 0.88, 2.25).unwrap();
assert!(loss.abs() > gain.abs()); // loss aversion

Feature Flags

Feature Default Description
std Yes Standard library support
hisab No Advanced math via hisab
pramana No Statistics via pramana
logging No Tracing subscriber
full No All features

Consumers

  • bhava — psychometric validation of personality measurements
  • kiran/joshua — NPC cognition, player modeling
  • agnosai — decision-making models for agents

License

GPL-3.0-only