commit 9aa7714f7c7707bb85b2e5745c617e6a679a897d Author: NunoSempere Date: Mon May 22 20:19:04 2023 -0400 feat: first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a050895 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +data +data/** diff --git a/bigint/bigint b/bigint/bigint new file mode 100755 index 0000000..415a700 Binary files /dev/null and b/bigint/bigint differ diff --git a/bigint/bigint.nim b/bigint/bigint.nim new file mode 100644 index 0000000..a712278 --- /dev/null +++ b/bigint/bigint.nim @@ -0,0 +1,5 @@ +import bigints + +let x = initBigInt("810896098877923596128062174904361421866219158") +echo x + diff --git a/bigint/parseutils.nim b/bigint/parseutils.nim new file mode 100644 index 0000000..de8c7ac --- /dev/null +++ b/bigint/parseutils.nim @@ -0,0 +1,6 @@ +# import parseutils + +# echo parseInt("810896098877923596128062174904361421866219158") +# var res = 0 +# discard parseSaturatedNatural("810896098877923596128062174904361421866219158", res) +# echo res diff --git a/index.md b/index.md new file mode 100644 index 0000000..c771709 --- /dev/null +++ b/index.md @@ -0,0 +1,30 @@ +## Dependencies + +nimble install https://github.com/nim-lang/bigints +https://nimdocs.com/nim-lang/bigints/bigints.html + +## To do + +- [ ] Exploration of OEIS data +- [ ] Subdivide subsequent tasks into steps + +--- + +An implementation of Infrabayesianism over OEIS sequences. + + +Or "Just-in-Time bayesianism", where getting a new hypothesis = getting a new sequence from OEIS which has the numbers you've seen so far. + +Implementing Infrabayesianism as a game over OEIS sequences. Two parts: +1. Prediction over interleaved sequences. I choose two OEIS sequences, and interleave them: a1, b1, a2, b2. + - Now, you don't have hypothesis over the whole set, but two hypothesis over the + - I could also have a chemistry like iteration: + a1 + a2 b1 + a3 b2 c1 + a4 b3 c2 d1 + a5 b4 c3 d2 e1 + ................. + - And then it would just be computationally absurd to have hypotheses over the whole + +2. Game where: You provide a deterministic procedure for estimating the probability of each OEIS sequence giving a list of trailing examples. diff --git a/jit_bayes b/jit_bayes new file mode 100755 index 0000000..8d532e7 Binary files /dev/null and b/jit_bayes differ diff --git a/jit_bayes.nim b/jit_bayes.nim new file mode 100644 index 0000000..61466e3 --- /dev/null +++ b/jit_bayes.nim @@ -0,0 +1,20 @@ +import strutils +import sequtils +import bigints # type: BigInt + +# let x = initBigInt("810896098877923596128062174904361421866219158") + +let file_path = "./data/stripped" + +let f = open(file_path) +var line : string +var i = 0 +while f.read_line(line): + if i > 3: + let arr = split(line, ",") + let l = arr.len + let nums = arr[1..(l-2)] # .map(proc (x: string): BigInt = initBigInt(x)) + # echo nums + i = i + 1 + +f.close()