feat: first commit
This commit is contained in:
commit
9aa7714f7c
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
data
|
||||
data/**
|
BIN
bigint/bigint
Executable file
BIN
bigint/bigint
Executable file
Binary file not shown.
5
bigint/bigint.nim
Normal file
5
bigint/bigint.nim
Normal file
|
@ -0,0 +1,5 @@
|
|||
import bigints
|
||||
|
||||
let x = initBigInt("810896098877923596128062174904361421866219158")
|
||||
echo x
|
||||
|
6
bigint/parseutils.nim
Normal file
6
bigint/parseutils.nim
Normal file
|
@ -0,0 +1,6 @@
|
|||
# import parseutils
|
||||
|
||||
# echo parseInt("810896098877923596128062174904361421866219158")
|
||||
# var res = 0
|
||||
# discard parseSaturatedNatural("810896098877923596128062174904361421866219158", res)
|
||||
# echo res
|
30
index.md
Normal file
30
index.md
Normal file
|
@ -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.
|
||||
<https://oeis.org/wiki/JSON_Format,_Compressed_Files>
|
||||
|
||||
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.
|
20
jit_bayes.nim
Normal file
20
jit_bayes.nim
Normal file
|
@ -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()
|
Loading…
Reference in New Issue
Block a user