This isn’t a web app, but if you know your way around programming, I have a Racket script that does this. It looks like this when you use it (from the command line):
~ λ demon
Out of the blasted gates of hell spawns a demon -- the demon of epistemology. It thunders, I HAVE BEEN SUMMONED. WHAT PROPOSITION DO YOU PONDER? REMEMBER, I KNOW THE TRUTH OR FALSITY OF ALL THINGS.
> the european union will exist in year 2100
CHOOSE ONE --
[1] IF THE EUROPEAN UNION WILL EXIST IN YEAR 2100, I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF NOT, YOU GET NOTHING.
[2] IF MY 1d10 DIE ROLLS A 5 OR LOWER [=====-----], I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF IT ROLLS HIGHER, YOU GET NOTHING.
[3] YOU ARE UNSURE.
> 1
CHOOSE ONE --
[1] IF THE EUROPEAN UNION WILL EXIST IN YEAR 2100, I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF NOT, YOU GET NOTHING.
[2] IF MY 1d10 DIE ROLLS A 7 OR LOWER [=======---], I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF IT ROLLS HIGHER, YOU GET NOTHING.
[3] YOU ARE UNSURE.
> 1
CHOOSE ONE --
[1] IF THE EUROPEAN UNION WILL EXIST IN YEAR 2100, I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF NOT, YOU GET NOTHING.
[2] IF MY 1d10 DIE ROLLS A 8 OR LOWER [========--], I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES. IF IT ROLLS HIGHER, YOU GET NOTHING.
[3] YOU ARE UNSURE.
> 2
VERY WELL, the demon sighs. YOUR CREDENCE THAT THE EUROPEAN UNION WILL EXIST IN YEAR 2100 IS 75%.
Source code:
#! /usr/local/bin/racket
#lang cli
(require racket/list)
(require racket/string)
(help (usage "Figure out how certain you are that something is true using the equivalent bet test."))
(program (demon)
(displayln (string-append "Out of the blasted gates of hell spawns a demon -- the demon of epistemology. It "
"thunders, I HAVE BEEN SUMMONED. WHAT PROPOSITION DO YOU PONDER? REMEMBER, I KNOW "
"THE TRUTH OR FALSITY OF ALL THINGS."))
(display "> ")
(letrec ((lower-bound 0)
(upper-bound 10)
(prop (read-line))
;; TODO: use regexes here to match i at beginning. also fix me, we, us
(prop-upper (string-replace (string-upcase prop) " I " " YOU "))
(consequent "I BESTOW ON YOU A BEAUTIFUL PALACE OF UNIMAGINABLE RICHES")
(visualize-prob (lambda (n)
(string-append "["
(string-join (make-list n "=") "")
(string-join (make-list (- 10 n) "-") "")
"]")))
(run (lambda (min max)
(if (<= (- max min) 1)
(/ (+ max min) 2)
(let ((n (case '(min max)
['(lower-bound upper-bound) 5]
['(lower-bound 5) 1]
['(5 upper-bound) 9]
[else (quotient (+ min max) 2)])))
(begin
(displayln
(string-append
"\nCHOOSE ONE --\n"
"[1] IF " prop-upper ", " consequent ". IF NOT, YOU GET NOTHING.\n"
"[2] IF MY 1d10 DIE ROLLS A " (number->string n) " OR LOWER " (visualize-prob n) ", "
consequent ". IF IT ROLLS HIGHER, YOU GET NOTHING.\n"
"[3] YOU ARE UNSURE."))
(display "> ")
(case (read-line)
[("1") (run n max)]
[("2") (run min n)]
[("3") n]
[else (run min max)])))))))
(let ((percentage (* (/ 100 upper-bound) (run lower-bound upper-bound))))
(displayln
(string-append "VERY WELL, the demon sighs. "
"YOUR CREDENCE THAT " prop-upper " IS " (number->string percentage) "%.")))))
(run demon)
This isn’t a web app, but if you know your way around programming, I have a Racket script that does this. It looks like this when you use it (from the command line):
Source code: