[ prog / sol / mona ]

prog


[challenge] Try to rewrite SICP [urgent]

13 2022-08-19 03:41

A list of predictor runs with adapt going from 2 to 10 and window sizes going down to 4, 5 and 6. The maximum of the score curve for a constant adapt value appears to always be at a minimum window size of 5.

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 5 2
predict=170204=[115721, 54483]
length=1223834 index=1223834 cover=1.000000 score=780691 ratio=0.637906
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 6 2
predict=311206=[195485, 115721]
length=1223834 index=1223834 cover=1.000000 score=786525 ratio=0.642673
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 7 2
predict=481745=[286261, 195484]
length=1223834 index=1223834 cover=1.000000 score=762855 ratio=0.623332

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 6 3
predict=365689=[195485, 115721, 54483]
length=1223834 index=1223834 cover=1.000000 score=781178 ratio=0.638304
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 7 3
predict=597466=[286261, 195484, 115721]
length=1223834 index=1223834 cover=1.000000 score=787194 ratio=0.643220
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 8 3
predict=864302=[382559, 286260, 195483]
length=1223834 index=1223834 cover=1.000000 score=763585 ratio=0.623929

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 7 4
predict=651949=[286261, 195484, 115721, 54483]
length=1223834 index=1223834 cover=1.000000 score=781411 ratio=0.638494
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 8 4
predict=980022=[382559, 286260, 195483, 115720]
length=1223834 index=1223834 cover=1.000000 score=787575 ratio=0.643531
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 9 4
predict=1342766=[478467, 382558, 286259, 195482]
length=1223834 index=1223834 cover=1.000000 score=763970 ratio=0.624243

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 8 5
predict=1034505=[382559, 286260, 195483, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781551 ratio=0.638609
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 9 5
predict=1458486=[478467, 382558, 286259, 195482, 115720]
length=1223834 index=1223834 cover=1.000000 score=787784 ratio=0.643702
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 10 5
predict=1911272=[568509, 478466, 382557, 286258, 195482]
length=1223834 index=1223834 cover=1.000000 score=764277 ratio=0.624494

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 9 6
predict=1512969=[478467, 382558, 286259, 195482, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781632 ratio=0.638675
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 10 6
predict=2026992=[568509, 478466, 382557, 286258, 195482, 115720]
length=1223834 index=1223834 cover=1.000000 score=787920 ratio=0.643813
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 11 6
predict=2562376=[651107, 568508, 478465, 382556, 286258, 195482]
length=1223834 index=1223834 cover=1.000000 score=764455 ratio=0.624639

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 10 7
predict=2081475=[568509, 478466, 382557, 286258, 195482, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781672 ratio=0.638708
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 11 7
predict=2678096=[651107, 568508, 478465, 382556, 286258, 195482, 115720]
length=1223834 index=1223834 cover=1.000000 score=788015 ratio=0.643890
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 12 7
predict=3287473=[725100, 651106, 568507, 478464, 382556, 286258, 195482]
length=1223834 index=1223834 cover=1.000000 score=764582 ratio=0.624743

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 11 8
predict=2732579=[651107, 568508, 478465, 382556, 286258, 195482, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781708 ratio=0.638737
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 12 8
predict=3403193=[725100, 651106, 568507, 478464, 382556, 286258, 195482, 115720]
length=1223834 index=1223834 cover=1.000000 score=788078 ratio=0.643942
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 13 8
predict=4077835=[790368, 725099, 651105, 568506, 478463, 382555, 286257, 195482]
length=1223834 index=1223834 cover=1.000000 score=764644 ratio=0.624794

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 12 9
predict=3457676=[725100, 651106, 568507, 478464, 382556, 286258, 195482, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781736 ratio=0.638760
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 13 9
predict=4193555=[790368, 725099, 651105, 568506, 478463, 382555, 286257, 195482, 115720]
length=1223834 index=1223834 cover=1.000000 score=788116 ratio=0.643973
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 14 9
predict=4925639=[847812, 790367, 725098, 651104, 568505, 478462, 382554, 286256, 195481]
length=1223834 index=1223834 cover=1.000000 score=764718 ratio=0.624854

$ python3 -m flake.predictext temple o20u.md AdaptiveSW 13 10
predict=4248038=[790368, 725099, 651105, 568506, 478463, 382555, 286257, 195482, 115720, 54483]
length=1223834 index=1223834 cover=1.000000 score=781762 ratio=0.638781
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 14 10
predict=5041358=[847812, 790367, 725098, 651104, 568505, 478462, 382554, 286256, 195481, 115719]
length=1223834 index=1223834 cover=1.000000 score=788169 ratio=0.644016
$ python3 -m flake.predictext temple o20u.md AdaptiveSW 15 10
predict=5823422=[897792, 847811, 790366, 725097, 651103, 568504, 478461, 382553, 286255, 195480]
length=1223834 index=1223834 cover=1.000000 score=764750 ratio=0.624880

The adaptive window wins over the fixed window, as expected, but the margin is tiny. The best run with adapt<=10 is:
window=14 adapt=10
score=788169 ratio=0.644016

14


VIP:

do not edit these