BLOG

1 program Added 2026-02-23T10:05:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Bayesian Logic
Provenance: commit a36e2760f0 · authored 2026-02-23T16:00:08+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Mlog (0.21)F-Logic (0.18)N3 (0.18)PROGOL (0.18)CLASSIC (0.17)

LLM-contributed programs

Burglary-Earthquake Bayesian Network

Provenance: commit a36e2760f0 · authored 2026-02-23T16:00:08+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.blog · added: 2026-02-23T10:05:00Z
/* The class burglary-earthquake network, as presented in "Artificial
 * Intelligence: A Modern Approach", 2nd ed., p. 494.
 */

random Boolean Burglary ~ BooleanDistrib(0.001);

random Boolean Earthquake ~ BooleanDistrib(0.002);

random Boolean Alarm ~
  if Burglary then
    if Earthquake then BooleanDistrib(0.95)
    else  BooleanDistrib(0.94)
  else
    if Earthquake then BooleanDistrib(0.29)
    else BooleanDistrib(0.001);

random Boolean JohnCalls ~
  if Alarm then BooleanDistrib(0.9)
  else BooleanDistrib(0.05);

random Boolean MaryCalls ~
  if Alarm then BooleanDistrib(0.7)
  else BooleanDistrib(0.01);

/* Evidence for the burglary model saying that both
 * John and Mary called.  Given this evidence, the posterior probability
 * of Burglary is 0.284 (see p. 505 of "AI: A Modern Approach", 2nd ed.).
 */

obs JohnCalls = true;
obs MaryCalls = true;

/* Query for the burglary model asking whether Burglary
 * is true.
 */

query Burglary;

Contribute — propose a file extension

Tell us where to find evidence about BLOG (mapped to pl/blog). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/BLOG/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Blodwen Blood32 →