Computational psychiatry Explain step by step in simple language
computational psychiatry explained simply 2025
https://www.psychologytoday.com/us/blog/the-neuroscience-of-…
"The key logic is to use mathematical principles and formalism to generate consistent, rigorous, and testable hypotheses that can lead to a better understanding of mechanisms across levels of analysis."
- Kaplan & Sadock's Comprehensive Textbook of Psychiatry
Your brain's final belief = prior belief + new evidence, weighted by how reliable each is.
| Disorder | What Goes Wrong in the Calculation |
|---|---|
| Schizophrenia | Brain over-weights prior beliefs; ignores contradicting sensory data → hallucinations, delusions |
| Depression | Prior beliefs are strongly negative and "sticky" → everything is interpreted as bad |
| Anxiety | Threat priors are too high; danger signals are over-amplified |
| OCD | Prediction errors (signals that say "something is wrong") never quiet down |
LEVEL 1: Neurons & Synapses
(e.g., low dopamine, glutamate imbalance)
↓ [mathematical models bridge the gap]
LEVEL 2: Brain Circuits & Networks
(e.g., prefrontal cortex, limbic system activity)
↓ [computational models predict behavior]
LEVEL 3: Behavior & Symptoms
(e.g., anhedonia, paranoia, impulsivity)
| Type | What It Does | Example |
|---|---|---|
| Normative/Bayesian models | Describe what the brain should do in an ideal world, then find where it deviates | Predictive coding models of schizophrenia |
| Reinforcement learning models | Describe how the brain learns from experience and reward | Dopamine/reward models in depression and addiction |
| Step | Core Idea |
|---|---|
| 1 | Traditional psychiatry describes symptoms; computational psychiatry explains mechanisms |
| 2 | The brain is a prediction machine performing mathematical computations |
| 3 | Bayesian inference explains how prior beliefs + sensory data = perception |
| 4 | Models bridge neurons → circuits → behavior |
| 5 | Dopamine = biological prediction error signal; key to learning disorders |
| 6 | Researchers fit models to behavior data to extract "computational fingerprints" |
| 7 | Two main flavors: Bayesian/normative models and reinforcement learning models |
| 8 | Applications: biomarkers, treatment prediction, drug targets |
| 9 | Still emerging; not yet routine clinical practice |
Create a visual infographic explaining Bayesian inference in psychiatry
A clean, professional medical infographic titled "Bayesian Inference in Psychiatry" with the following sections laid out vertically: 1. Header: Bold title "Bayesian Inference in Psychiatry" with subtitle "How the brain combines beliefs and evidence" 2. Section: "The Core Formula" showing a visual equation: PRIOR BELIEF + NEW EVIDENCE → POSTERIOR BELIEF (e.g., "What I expected" + "What I just sensed" = "My updated perception") 3. Section: "A Simple Example" - Show a neutral/slightly negative face emoji or icon with two scenarios side by side: - LEFT box (HIGH prior = "People dislike me 80%"): Arrow shows same face → perceived as VERY negative (86% threat) - RIGHT box (LOW prior = "People dislike me 30%"): Arrow shows same face → perceived as NEUTRAL (39% threat) Label: "Same face. Different brain. Different reality." 4. Section: "When Bayesian Inference Goes Wrong" - Three disorder cards in a row: - SCHIZOPHRENIA card (purple): Brain icon with "Priors TOO STRONG → Ignores real evidence → Hallucinations & Delusions" - DEPRESSION card (blue): Brain icon with "Negative priors LOCKED IN → Everything feels hopeless → Anhedonia" - ANXIETY card (orange): Brain icon with "Threat prior TOO HIGH → Over-amplifies danger signals → Panic" 5. Section: "The Brain's Prediction Loop" - Simple circular diagram: Expectation → Sensory Input → Prediction Error → Update Belief → (back to) Expectation 6. Footer note: "Computational psychiatry uses math to measure these distortions — and find treatments that fix them" Use a clean modern design with a white/light background, teal and navy blue color scheme, medical illustration style, clear readable fonts, plenty of white space, icons and arrows.

Convert this infographic into a presentation slide deck
node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care…
ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/baye…
~/bayesian-psychiatry-pptx/build.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
// Fetch infographic image
const images = JSON.parse(
execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js "https://cdn.orris.care/image-gen/8997e4cfbfa94a0aad751c419e286949.png"`
).toString()
);
const infographicB64 = images[0].base64;
// ── Color Palette ──────────────────────────────────────────
const C = {
navyDark: "0A1628", // title/footer background
navy: "0D2244", // section headers
teal: "0E7490", // accent
tealLight: "17A3BF", // lighter accent
tealPale: "E0F7FA", // card backgrounds
white: "FFFFFF",
offWhite: "F4F8FB",
textDark: "0D2244",
textMid: "1E4060",
textLight: "5A7A9A",
purple: "6B3FA0",
purplePale: "EDE7F6",
blue: "1565C0",
bluePale: "E3F2FD",
orange: "E65100",
orangePale: "FFF3E0",
green: "1B7A4A",
greenPale: "E8F5E9",
accent: "F59E0B", // gold accent
};
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Bayesian Inference in Psychiatry";
pres.author = "Computational Psychiatry";
// ═══════════════════════════════════════════════════════════
// SLIDE 1 — Title Slide
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
// Full dark background
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark }, line: { color: C.navyDark } });
// Teal accent bar top
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.teal }, line: { color: C.teal } });
// Teal accent bar left
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0.08, w: 0.06, h: 5.545, fill: { color: C.teal }, line: { color: C.teal } });
// Decorative circle background
sl.addShape(pres.shapes.OVAL, { x: 6.2, y: -1.2, w: 5.5, h: 5.5, fill: { color: C.teal, transparency: 88 }, line: { color: C.teal, transparency: 88 } });
sl.addShape(pres.shapes.OVAL, { x: 7.0, y: 2.0, w: 3.5, h: 3.5, fill: { color: C.tealLight, transparency: 92 }, line: { color: C.tealLight, transparency: 92 } });
// Pill tag
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.6, y: 1.05, w: 2.8, h: 0.38, fill: { color: C.teal }, line: { color: C.teal }, rectRadius: 0.19 });
sl.addText("COMPUTATIONAL PSYCHIATRY", { x: 0.6, y: 1.05, w: 2.8, h: 0.38, fontSize: 8.5, bold: true, color: C.white, align: "center", valign: "middle", charSpacing: 1.5, margin: 0 });
// Main title
sl.addText([
{ text: "Bayesian Inference", options: { breakLine: true, bold: true, fontSize: 40, color: C.white } },
{ text: "in Psychiatry", options: { bold: true, fontSize: 40, color: C.tealLight } },
], { x: 0.6, y: 1.6, w: 8.5, h: 1.5, valign: "top", margin: 0 });
// Subtitle
sl.addText("How the brain combines beliefs and evidence — and what happens when it goes wrong", {
x: 0.6, y: 3.15, w: 7.2, h: 0.75, fontSize: 14, color: "8AB4CC", italic: true, valign: "top", margin: 0
});
// Bottom label
sl.addText("Orris · Computational Psychiatry Series", {
x: 0.6, y: 5.1, w: 8, h: 0.35, fontSize: 9, color: "4A7090", align: "left", margin: 0
});
// Gold accent line under title
sl.addShape(pres.shapes.RECTANGLE, { x: 0.6, y: 3.08, w: 1.8, h: 0.04, fill: { color: C.accent }, line: { color: C.accent } });
}
// ═══════════════════════════════════════════════════════════
// SLIDE 2 — What Is Bayesian Inference?
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
// Header bar
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SLIDE 1 OF 6", { x: 0.4, y: 0.08, w: 3, h: 0.28, fontSize: 8, color: "5A8AAA", charSpacing: 1.5, margin: 0 });
sl.addText("What Is Bayesian Inference?", { x: 0.4, y: 0.32, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white, margin: 0 });
// Core formula box
sl.addShape(pres.shapes.RECTANGLE, {
x: 0.4, y: 1.25, w: 9.2, h: 0.9,
fill: { color: C.navy },
line: { color: C.teal, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.12 }
});
sl.addText([
{ text: "Prior Belief ", options: { bold: true, color: C.tealLight, fontSize: 18 } },
{ text: "+ ", options: { color: C.white, fontSize: 18 } },
{ text: "New Evidence ", options: { bold: true, color: C.accent, fontSize: 18 } },
{ text: "→ ", options: { color: C.white, fontSize: 18 } },
{ text: "Updated Perception", options: { bold: true, color: C.white, fontSize: 18 } },
], { x: 0.4, y: 1.25, w: 9.2, h: 0.9, align: "center", valign: "middle", margin: 0 });
// Three explanation cards
const cards = [
{ label: "Prior Belief", desc: "What the brain already expects before getting any new input. Formed by past experience and memory.", accent: C.teal, pale: C.tealPale, x: 0.4 },
{ label: "New Evidence", desc: "Raw sensory data arriving in the moment — sights, sounds, touch, what someone says.", accent: C.accent, pale: "#FFF8E1", x: 3.7 },
{ label: "Updated Perception", desc: "The brain's best guess combining both. This is what we actually see, feel, and believe.", accent: C.navy, pale: C.bluePale, x: 7.0 },
];
cards.forEach(c => {
sl.addShape(pres.shapes.RECTANGLE, {
x: c.x, y: 2.35, w: 2.85, h: 2.9,
fill: { color: c.pale },
line: { color: c.accent, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.1 }
});
// Accent header strip
sl.addShape(pres.shapes.RECTANGLE, { x: c.x, y: 2.35, w: 2.85, h: 0.36, fill: { color: c.accent }, line: { color: c.accent } });
sl.addText(c.label, { x: c.x, y: 2.35, w: 2.85, h: 0.36, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText(c.desc, { x: c.x + 0.15, y: 2.78, w: 2.55, h: 2.3, fontSize: 12, color: C.textDark, valign: "top", wrap: true, margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════
// SLIDE 3 — The Brain as a Prediction Machine
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SLIDE 2 OF 6", { x: 0.4, y: 0.08, w: 3, h: 0.28, fontSize: 8, color: "5A8AAA", charSpacing: 1.5, margin: 0 });
sl.addText("The Brain as a Prediction Machine", { x: 0.4, y: 0.32, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white, margin: 0 });
// Intro text
sl.addText("Every moment, your brain runs a continuous loop — predicting what will happen, sensing what does happen, and updating its model of the world.", {
x: 0.4, y: 1.18, w: 9.2, h: 0.6, fontSize: 13, color: C.textMid, italic: true, valign: "middle", margin: 0
});
// Loop steps — horizontal flow
const steps = [
{ num: "1", title: "Expectation", desc: "Brain predicts what it will sense next", color: C.teal },
{ num: "2", title: "Sensory Input", desc: "Raw signal arrives from the environment", color: C.tealLight },
{ num: "3", title: "Prediction Error", desc: "Gap between expected and actual signal", color: C.accent },
{ num: "4", title: "Update Belief", desc: "Brain revises its model for next time", color: C.navy },
];
const startX = 0.35;
const boxW = 2.05;
const gap = 0.22;
steps.forEach((s, i) => {
const x = startX + i * (boxW + gap);
// Box
sl.addShape(pres.shapes.RECTANGLE, {
x, y: 2.0, w: boxW, h: 2.8,
fill: { color: C.white },
line: { color: s.color, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.1 }
});
// Colored top
sl.addShape(pres.shapes.RECTANGLE, { x, y: 2.0, w: boxW, h: 0.5, fill: { color: s.color }, line: { color: s.color } });
// Number circle
sl.addShape(pres.shapes.OVAL, { x: x + 0.7, y: 1.7, w: 0.65, h: 0.65, fill: { color: s.color }, line: { color: s.color } });
sl.addText(s.num, { x: x + 0.7, y: 1.7, w: 0.65, h: 0.65, fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText(s.title, { x, y: 2.0, w: boxW, h: 0.5, fontSize: 12, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText(s.desc, { x: x + 0.1, y: 2.58, w: boxW - 0.2, h: 2.0, fontSize: 12, color: C.textDark, wrap: true, valign: "top", margin: 0 });
// Arrow between steps
if (i < steps.length - 1) {
const ax = x + boxW + 0.02;
sl.addShape(pres.shapes.RECTANGLE, { x: ax, y: 3.32, w: 0.14, h: 0.06, fill: { color: C.textLight }, line: { color: C.textLight } });
sl.addText("→", { x: ax - 0.04, y: 3.18, w: 0.28, h: 0.32, fontSize: 14, color: C.textLight, align: "center", valign: "middle", margin: 0 });
}
});
// Cycle note
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 2.5, y: 5.1, w: 5, h: 0.35, fill: { color: C.tealPale }, line: { color: C.teal }, rectRadius: 0.1 });
sl.addText("↺ This loop repeats hundreds of times per second", {
x: 2.5, y: 5.1, w: 5, h: 0.35, fontSize: 10, color: C.teal, align: "center", valign: "middle", bold: true, margin: 0
});
}
// ═══════════════════════════════════════════════════════════
// SLIDE 4 — The Face Example
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SLIDE 3 OF 6", { x: 0.4, y: 0.08, w: 3, h: 0.28, fontSize: 8, color: "5A8AAA", charSpacing: 1.5, margin: 0 });
sl.addText("Same Face, Different Brain, Different Reality", { x: 0.4, y: 0.32, w: 9.2, h: 0.55, fontSize: 24, bold: true, color: C.white, margin: 0 });
// Central face stimulus
sl.addShape(pres.shapes.OVAL, { x: 4.3, y: 1.25, w: 1.4, h: 1.4, fill: { color: C.tealPale }, line: { color: C.teal, pt: 2.5 } });
sl.addText("😐", { x: 4.3, y: 1.25, w: 1.4, h: 1.4, fontSize: 36, align: "center", valign: "middle", margin: 0 });
sl.addText("Slightly negative face\n(same sensory input)", {
x: 3.6, y: 2.7, w: 2.8, h: 0.55, fontSize: 9.5, color: C.textMid, align: "center", italic: true, margin: 0
});
// Left box — high prior
sl.addShape(pres.shapes.RECTANGLE, {
x: 0.3, y: 1.2, w: 3.7, h: 3.9,
fill: { color: "#FFF0F0" },
line: { color: C.orange, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.1 }
});
sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 1.2, w: 3.7, h: 0.42, fill: { color: C.orange }, line: { color: C.orange } });
sl.addText("HIGH Prior — 'People dislike me 80%'", { x: 0.3, y: 1.2, w: 3.7, h: 0.42, fontSize: 10.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText([
{ text: "Prior: ", options: { bold: true, color: C.orange } },
{ text: "p = 0.80\n", options: { color: C.textDark } },
{ text: "Sensory signal: ", options: { bold: true, color: C.textMid } },
{ text: "p = 0.60\n\n", options: { color: C.textDark } },
{ text: "Result: ", options: { bold: true, color: C.orange } },
{ text: "86% chance they dislike you\n\n", options: { bold: true, fontSize: 14, color: C.orange } },
{ text: "→ Face perceived as HOSTILE\n", options: { color: C.orange, bold: true } },
{ text: "→ Social anxiety, paranoia risk", options: { color: C.textMid, italic: true } },
], { x: 0.5, y: 1.72, w: 3.3, h: 3.2, fontSize: 12, valign: "top", wrap: true, margin: 0 });
// Right box — low prior
sl.addShape(pres.shapes.RECTANGLE, {
x: 6.0, y: 1.2, w: 3.7, h: 3.9,
fill: { color: C.greenPale },
line: { color: C.green, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.1 }
});
sl.addShape(pres.shapes.RECTANGLE, { x: 6.0, y: 1.2, w: 3.7, h: 0.42, fill: { color: C.green }, line: { color: C.green } });
sl.addText("LOW Prior — 'People dislike me 30%'", { x: 6.0, y: 1.2, w: 3.7, h: 0.42, fontSize: 10.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText([
{ text: "Prior: ", options: { bold: true, color: C.green } },
{ text: "p = 0.30\n", options: { color: C.textDark } },
{ text: "Sensory signal: ", options: { bold: true, color: C.textMid } },
{ text: "p = 0.60\n\n", options: { color: C.textDark } },
{ text: "Result: ", options: { bold: true, color: C.green } },
{ text: "39% chance they dislike you\n\n", options: { bold: true, fontSize: 14, color: C.green } },
{ text: "→ Face perceived as NEUTRAL\n", options: { color: C.green, bold: true } },
{ text: "→ Healthy social interpretation", options: { color: C.textMid, italic: true } },
], { x: 6.2, y: 1.72, w: 3.3, h: 3.2, fontSize: 12, valign: "top", wrap: true, margin: 0 });
// Arrows from center to boxes
sl.addText("◀", { x: 3.85, y: 2.0, w: 0.5, h: 0.4, fontSize: 18, color: C.orange, align: "center", valign: "middle", margin: 0 });
sl.addText("▶", { x: 5.65, y: 2.0, w: 0.5, h: 0.4, fontSize: 18, color: C.green, align: "center", valign: "middle", margin: 0 });
// Key insight
sl.addShape(pres.shapes.RECTANGLE, { x: 0.3, y: 5.12, w: 9.4, h: 0.35, fill: { color: C.navy }, line: { color: C.navy } });
sl.addText("Key insight: The same sensory signal produces entirely different realities depending on prior beliefs.", {
x: 0.3, y: 5.12, w: 9.4, h: 0.35, fontSize: 10, bold: true, color: C.tealLight, align: "center", valign: "middle", margin: 0
});
}
// ═══════════════════════════════════════════════════════════
// SLIDE 5 — When Bayesian Inference Goes Wrong
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SLIDE 4 OF 6", { x: 0.4, y: 0.08, w: 3, h: 0.28, fontSize: 8, color: "5A8AAA", charSpacing: 1.5, margin: 0 });
sl.addText("When Bayesian Inference Goes Wrong", { x: 0.4, y: 0.32, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white, margin: 0 });
const disorders = [
{
name: "Schizophrenia",
emoji: "🔴",
problem: "Priors too strong",
desc: "The brain over-weights its own expectations and under-weights real sensory evidence.",
result: "Hallucinations · Delusions",
detail: "Hears voices even in silence; believes unrelated events are personally directed.",
color: C.purple,
pale: C.purplePale,
x: 0.3
},
{
name: "Depression",
emoji: "🔵",
problem: "Negative priors locked in",
desc: "Strongly negative prior beliefs override neutral or positive evidence from the world.",
result: "Anhedonia · Hopelessness",
detail: "Good events fail to update the negative world-model; reward signals are blunted.",
color: C.blue,
pale: C.bluePale,
x: 3.65
},
{
name: "Anxiety",
emoji: "🟠",
problem: "Threat prior too high",
desc: "Danger signals are over-amplified; ambiguous input is defaulted to threatening.",
result: "Panic · Hypervigilance",
detail: "Normal sensations (heartbeat, crowds) are computed as high-risk emergencies.",
color: C.orange,
pale: C.orangePale,
x: 7.0
}
];
disorders.forEach(d => {
sl.addShape(pres.shapes.RECTANGLE, {
x: d.x, y: 1.18, w: 2.85, h: 4.25,
fill: { color: d.pale },
line: { color: d.color, pt: 2.5 },
shadow: { type: "outer", color: "000000", blur: 8, offset: 2, angle: 135, opacity: 0.12 }
});
// Header
sl.addShape(pres.shapes.RECTANGLE, { x: d.x, y: 1.18, w: 2.85, h: 0.55, fill: { color: d.color }, line: { color: d.color } });
sl.addText(d.name, { x: d.x, y: 1.18, w: 2.85, h: 0.55, fontSize: 15, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
// Problem tag
sl.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: d.x + 0.15, y: 1.85, w: 2.55, h: 0.35, fill: { color: d.color, transparency: 82 }, line: { color: d.color }, rectRadius: 0.08 });
sl.addText("⚠ " + d.problem, { x: d.x + 0.15, y: 1.85, w: 2.55, h: 0.35, fontSize: 10, bold: true, color: d.color, align: "center", valign: "middle", margin: 0 });
sl.addText(d.desc, { x: d.x + 0.15, y: 2.3, w: 2.55, h: 1.0, fontSize: 11.5, color: C.textDark, wrap: true, valign: "top", margin: 0 });
// Result badge
sl.addShape(pres.shapes.RECTANGLE, { x: d.x + 0.15, y: 3.38, w: 2.55, h: 0.38, fill: { color: d.color }, line: { color: d.color } });
sl.addText(d.result, { x: d.x + 0.15, y: 3.38, w: 2.55, h: 0.38, fontSize: 11, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText(d.detail, { x: d.x + 0.15, y: 3.84, w: 2.55, h: 1.4, fontSize: 10.5, color: C.textMid, wrap: true, italic: true, valign: "top", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════
// SLIDE 6 — Full Infographic Reference
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark }, line: { color: C.navyDark } });
sl.addText("Full Infographic Summary", {
x: 0.4, y: 0.12, w: 9.2, h: 0.48, fontSize: 18, bold: true, color: C.white, margin: 0
});
sl.addShape(pres.shapes.RECTANGLE, { x: 0.4, y: 0.58, w: 2.0, h: 0.04, fill: { color: C.teal }, line: { color: C.teal } });
sl.addImage({ data: infographicB64, x: 1.2, y: 0.72, w: 7.6, h: 4.7 });
}
// ═══════════════════════════════════════════════════════════
// SLIDE 7 — Clinical Applications
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.offWhite }, line: { color: C.offWhite } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy }, line: { color: C.navy } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText("SLIDE 5 OF 6", { x: 0.4, y: 0.08, w: 3, h: 0.28, fontSize: 8, color: "5A8AAA", charSpacing: 1.5, margin: 0 });
sl.addText("Clinical Applications", { x: 0.4, y: 0.32, w: 9.2, h: 0.55, fontSize: 26, bold: true, color: C.white, margin: 0 });
const apps = [
{ icon: "🎯", title: "Better Diagnosis", desc: "Computerized tasks extract 'computational fingerprints' — objective biomarkers that go beyond symptom checklists.", color: C.teal },
{ icon: "💊", title: "Predict Treatment Response", desc: "Model parameters can forecast whether a patient will respond to a specific drug before treatment starts.", color: C.navy },
{ icon: "🔬", title: "Drug Development", desc: "If a model pinpoints which Bayesian parameter is disrupted, a drug targeting that exact mechanism becomes a rational goal.", color: C.purple },
{ icon: "👤", title: "Personalized Medicine", desc: "Individual differences in brain computation explain why two patients with the same diagnosis need different treatments.", color: C.tealLight },
];
apps.forEach((a, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = col === 0 ? 0.35 : 5.15;
const y = row === 0 ? 1.2 : 3.35;
sl.addShape(pres.shapes.RECTANGLE, {
x, y, w: 4.45, h: 1.85,
fill: { color: C.white },
line: { color: a.color, pt: 2 },
shadow: { type: "outer", color: "000000", blur: 6, offset: 2, angle: 135, opacity: 0.1 }
});
sl.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.55, h: 1.85, fill: { color: a.color }, line: { color: a.color } });
sl.addText(a.icon, { x, y, w: 0.55, h: 1.85, fontSize: 22, align: "center", valign: "middle", margin: 0 });
sl.addText(a.title, { x: x + 0.65, y: y + 0.18, w: 3.65, h: 0.4, fontSize: 13, bold: true, color: a.color, margin: 0 });
sl.addText(a.desc, { x: x + 0.65, y: y + 0.58, w: 3.65, h: 1.1, fontSize: 11.5, color: C.textDark, wrap: true, valign: "top", margin: 0 });
});
}
// ═══════════════════════════════════════════════════════════
// SLIDE 8 — Closing / Key Takeaways
// ═══════════════════════════════════════════════════════════
{
const sl = pres.addSlide();
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navyDark }, line: { color: C.navyDark } });
sl.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: C.teal }, line: { color: C.teal } });
// Decorative circles
sl.addShape(pres.shapes.OVAL, { x: -1, y: 3.5, w: 4, h: 4, fill: { color: C.teal, transparency: 90 }, line: { color: C.teal, transparency: 90 } });
sl.addShape(pres.shapes.OVAL, { x: 8.5, y: -0.5, w: 3, h: 3, fill: { color: C.tealLight, transparency: 90 }, line: { color: C.tealLight, transparency: 90 } });
sl.addText("SLIDE 6 OF 6", { x: 0.5, y: 0.22, w: 3, h: 0.28, fontSize: 8, color: "4A7090", charSpacing: 1.5, margin: 0 });
sl.addText("Key Takeaways", { x: 0.5, y: 0.52, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.white, margin: 0 });
sl.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 1.15, w: 2.2, h: 0.05, fill: { color: C.accent }, line: { color: C.accent } });
const takeaways = [
{ num: "01", text: "The brain is a Bayesian prediction machine — it constantly combines beliefs with evidence." },
{ num: "02", text: "Mental illness can be modeled as specific, measurable distortions in that calculation." },
{ num: "03", text: "The same sensory input creates different realities depending on prior beliefs." },
{ num: "04", text: "Computational models bridge neurons → circuits → behavior in a mathematically rigorous way." },
{ num: "05", text: "The field promises objective biomarkers, better drug targets, and personalized treatment." },
];
takeaways.forEach((t, i) => {
const y = 1.35 + i * 0.8;
sl.addShape(pres.shapes.OVAL, { x: 0.5, y: y + 0.05, w: 0.5, h: 0.5, fill: { color: C.teal }, line: { color: C.teal } });
sl.addText(t.num, { x: 0.5, y: y + 0.05, w: 0.5, h: 0.5, fontSize: 10, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
sl.addText(t.text, { x: 1.15, y, w: 8.1, h: 0.6, fontSize: 13, color: C.white, valign: "middle", wrap: true, margin: 0 });
});
sl.addText("Orris · Computational Psychiatry Series · 2026", {
x: 0.5, y: 5.22, w: 9, h: 0.28, fontSize: 9, color: "3A6080", align: "center", margin: 0
});
}
// Save
pres.writeFile({ fileName: "/home/daytona/workspace/bayesian-psychiatry-pptx/Bayesian_Inference_Psychiatry.pptx" })
.then(() => console.log("DONE"))
.catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/bayesian-psychiatry-pptx && node build.js 2>&1
curl -s "https://cdn.orris.care/image-gen/8997e4cfbfa94a0aad751c419e286949.png" …
~/bayesian-psychiatry-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/bayesian-psychiatry-pptx/build.js'
~/bayesian-psychiatry-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/bayesian-psychiatry-pptx/build.js'
~/bayesian-psychiatry-pptx/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/bayesian-psychiatry-pptx/build.js'
cd /home/daytona/workspace/bayesian-psychiatry-pptx && node build.js 2>&1
ls -lh /home/daytona/workspace/bayesian-psychiatry-pptx/Bayesian_Inference_Psych…
Bayesian Inference Psychiatry
Presentation · PPTX
| Slide | Title | Content |
|---|---|---|
| 1 | Title Slide | Dark navy/teal design with gold accent |
| 2 | What Is Bayesian Inference? | The core formula + 3 definition cards (Prior, Evidence, Posterior) |
| 3 | The Brain as a Prediction Machine | 4-step numbered loop: Expect → Sense → Error → Update |
| 4 | Same Face, Different Brain | Side-by-side comparison - high vs low prior, with probability math |
| 5 | When Bayesian Inference Goes Wrong | 3 disorder cards: Schizophrenia (purple), Depression (blue), Anxiety (orange) |
| 6 | Full Infographic | The original infographic embedded on a dark background |
| 7 | Clinical Applications | 4 application tiles: Diagnosis, Treatment Prediction, Drug Development, Personalized Medicine |
| 8 | Key Takeaways | 5 numbered callouts on a dark close slide |
Make a write up about the chronophage of cambridge....including its mechanism of working
Chronophage Cambridge Corpus Clock mechanism how it works John Taylor
Corpus Clock Cambridge grasshopper escapement mechanism Chronophage details
https://en.wikipedia.org/wiki/Corpus_Clock
"Basically I view time as not on your side. He'll eat up every minute of your life, and as soon as one has gone he's salivating for the next."
"No one knows how a grasshopper escapement works. So I decided to turn the clock inside out - to make the escapement the biggest gear on the clock, so you can actually see it working."
"Nothing works like clockwork."
mundus transit et concupiscentia eius "The world passeth away, and the lust thereof."