Author Topic: Looking for old program or help recreating it  (Read 8817 times)

0 Members and 1 Guest are viewing this topic.

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #15 on: December 08, 2021, 08:12:40 pm »
Hey @random1

I'll look a little more deeply into your attempts right after I post this, but I want you let you know I'm cracking this problem pretty easily based on a previous work of mine. I want to bring you on board with this. So please consider this random string:

"010010010100100101010100101010101010101010101101101010101001111101010101010101010101001010101010"

Qualitatively, what I tried to do was just mash 1 and 0 in a sloppy left-right fashion. Sure, there are clusters of 0's and 1's, no problem. But the overall dominating pattern, particularly at the end, is alternating 0's and 1's. So, can we make a program to detect that? Absolutely yes. The model is fully general and will detect any pattern at any frequency up to n=5 characters at a time, but one can easily make this bigger. See if you can make sense of the code below. I didn't explain it much here, but the stuff I was saying above is implemented in this code. You can see that there will be numbers accumulating next to common patterns in the test string. Super fast, super systematic, will answer your question... Lemme know what you think before this code gets too far ahead. I'll quit til I hear back.

Code: QB64: [Select]
  1. Screen _NewImage(800, 800, 32)
  2.  
  3. Type Letter
  4.     Signature As String
  5.     Count As Integer
  6.  
  7. Dim Shared Alphabet1(2) As Letter
  8. Alphabet1(1).Signature = "0"
  9. Alphabet1(2).Signature = "1"
  10.  
  11. Dim Shared Alphabet2(4) As Letter
  12. Alphabet2(1).Signature = "00"
  13. Alphabet2(2).Signature = "01"
  14. Alphabet2(3).Signature = "10"
  15. Alphabet2(4).Signature = "11"
  16.  
  17. Dim Shared Alphabet3(8) As Letter
  18. Alphabet3(1).Signature = "000"
  19. Alphabet3(2).Signature = "001"
  20. Alphabet3(3).Signature = "010"
  21. Alphabet3(4).Signature = "011"
  22. Alphabet3(5).Signature = "100"
  23. Alphabet3(6).Signature = "101"
  24. Alphabet3(7).Signature = "110"
  25. Alphabet3(8).Signature = "111"
  26.  
  27. Dim Shared Alphabet4(16) As Letter
  28. Alphabet4(1).Signature = "0000"
  29. Alphabet4(2).Signature = "0001"
  30. Alphabet4(3).Signature = "0010"
  31. Alphabet4(4).Signature = "0011"
  32. Alphabet4(5).Signature = "0100"
  33. Alphabet4(6).Signature = "0101"
  34. Alphabet4(7).Signature = "0110"
  35. Alphabet4(8).Signature = "0111"
  36. Alphabet4(9).Signature = "1000"
  37. Alphabet4(10).Signature = "1001"
  38. Alphabet4(11).Signature = "1010"
  39. Alphabet4(12).Signature = "1011"
  40. Alphabet4(13).Signature = "1100"
  41. Alphabet4(14).Signature = "1101"
  42. Alphabet4(15).Signature = "1110"
  43. Alphabet4(16).Signature = "1111"
  44.  
  45. Dim Shared Alphabet5(32) As Letter
  46. Alphabet5(1).Signature = "00000"
  47. Alphabet5(2).Signature = "00001"
  48. Alphabet5(3).Signature = "00010"
  49. Alphabet5(4).Signature = "00011"
  50. Alphabet5(5).Signature = "00100"
  51. Alphabet5(6).Signature = "00101"
  52. Alphabet5(7).Signature = "00110"
  53. Alphabet5(8).Signature = "00111"
  54. Alphabet5(9).Signature = "01000"
  55. Alphabet5(10).Signature = "01001"
  56. Alphabet5(11).Signature = "01010"
  57. Alphabet5(12).Signature = "01011"
  58. Alphabet5(13).Signature = "01100"
  59. Alphabet5(14).Signature = "01101"
  60. Alphabet5(15).Signature = "01110"
  61. Alphabet5(16).Signature = "01111"
  62. Alphabet5(17).Signature = "10000"
  63. Alphabet5(18).Signature = "10001"
  64. Alphabet5(19).Signature = "10010"
  65. Alphabet5(20).Signature = "10011"
  66. Alphabet5(21).Signature = "10100"
  67. Alphabet5(22).Signature = "10101"
  68. Alphabet5(23).Signature = "10110"
  69. Alphabet5(24).Signature = "10111"
  70. Alphabet5(25).Signature = "11000"
  71. Alphabet5(26).Signature = "11001"
  72. Alphabet5(27).Signature = "11010"
  73. Alphabet5(28).Signature = "11011"
  74. Alphabet5(29).Signature = "11100"
  75. Alphabet5(30).Signature = "11101"
  76. Alphabet5(31).Signature = "11110"
  77. Alphabet5(32).Signature = "11111"
  78.  
  79.  
  80. Call ResetCount
  81.  
  82. Dim FingerPrint(6) As String
  83.  
  84. FingerPrint(1) = "010010010100100101010100101010101010101010101101101010101001111101010101010101010101001010101010"
  85.  
  86. For n = 2 To UBound(FingerPrint)
  87.     FingerPrint(n) = Right$(FingerPrint(n - 1), Len(FingerPrint(n - 1)) - 1) + Left$(FingerPrint(n - 1), 1)
  88.  
  89. For m = 1 To 2
  90.     For n = 1 To Len(FingerPrint(m)) Step 2
  91.         a$ = Mid$(FingerPrint(m), n, 2)
  92.         For k = 1 To UBound(Alphabet2)
  93.             If a$ = Alphabet2(k).Signature Then
  94.                 Alphabet2(k).Count = Alphabet2(k).Count + 1
  95.             End If
  96.         Next
  97.     Next
  98.  
  99.     For k = 1 To UBound(Alphabet2)
  100.         Locate k, 1 + 12 * (m - 1)
  101.         Print Alphabet2(k).Signature; Alphabet2(k).Count
  102.     Next
  103.  
  104.     Sleep
  105.  
  106.  
  107. For m = 1 To 3
  108.     For n = 1 To Len(FingerPrint(m)) Step 3
  109.         a$ = Mid$(FingerPrint(m), n, 3)
  110.         For k = 1 To UBound(Alphabet3)
  111.             If a$ = Alphabet3(k).Signature Then
  112.                 Alphabet3(k).Count = Alphabet3(k).Count + 1
  113.             End If
  114.         Next
  115.     Next
  116.  
  117.     For k = 1 To UBound(Alphabet3)
  118.         Locate k, 1 + 12 * (m - 1)
  119.         Print Alphabet3(k).Signature; Alphabet3(k).Count
  120.     Next
  121.  
  122.     Sleep
  123.  
  124.  
  125. For m = 1 To 4
  126.     For n = 1 To Len(FingerPrint(m)) Step 4
  127.         a$ = Mid$(FingerPrint(m), n, 4)
  128.         For k = 1 To UBound(Alphabet4)
  129.             If a$ = Alphabet4(k).Signature Then
  130.                 Alphabet4(k).Count = Alphabet4(k).Count + 1
  131.             End If
  132.         Next
  133.     Next
  134.  
  135.     For k = 1 To UBound(Alphabet4)
  136.         Locate k, 1 + 12 * (m - 1)
  137.         Print Alphabet4(k).Signature; Alphabet4(k).Count
  138.     Next
  139.  
  140.     Sleep
  141.  
  142.  
  143. For m = 1 To 5
  144.     For n = 1 To Len(FingerPrint(m)) Step 5
  145.         a$ = Mid$(FingerPrint(m), n, 5)
  146.         For k = 1 To UBound(Alphabet5)
  147.             If a$ = Alphabet5(k).Signature Then
  148.                 Alphabet5(k).Count = Alphabet5(k).Count + 1
  149.             End If
  150.         Next
  151.     Next
  152.  
  153.     For k = 1 To UBound(Alphabet5)
  154.         Locate k, 1 + 12 * (m - 1)
  155.         Print Alphabet5(k).Signature; Alphabet5(k).Count
  156.     Next
  157.  
  158.     Sleep
  159.  
  160.  
  161. Sub ResetCount
  162.     For n = 1 To UBound(Alphabet1)
  163.         Alphabet1(n).Count = 0
  164.     Next
  165.     For n = 1 To UBound(Alphabet2)
  166.         Alphabet2(n).Count = 0
  167.     Next
  168.     For n = 1 To UBound(Alphabet3)
  169.         Alphabet3(n).Count = 0
  170.     Next
  171.     For n = 1 To UBound(Alphabet4)
  172.         Alphabet4(n).Count = 0
  173.     Next

« Last Edit: December 08, 2021, 11:41:28 pm by odin »
You're not done when it works, you're done when it's right.

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #16 on: December 08, 2021, 08:24:42 pm »
Alright, I couldn't resist running your sample data string into my program. I can see you picked a weird sequence, but I highlighted the most indicative numbers (as of now)... see if any of that seems useful, seeing how you studied that string extensively, I bet:

Code: [Select]
0001000001011100000011000100011000010010000000000000000011000000000000000001110010000000000001111000000001001110000000000000100000000011110000000000000000000000000000010100000000000000000100000000000000110001111000010001000000000000000000011010000000000000000010001101100000100001000000110011000011010010000000000000000000100001000011000110001010000000100000000000000000000000000000000000010000000000100000000000000010100000100000000000000000000000000000000000100001000000000000000010110100000000000010010000000000000000000100000000001100000011000000000000000000000000000000110010000110000100000   
  [ You are not allowed to view this attachment ]  

Oh, and if I was to finish coding the program, I would have it predict a 0 for the next digit.
You're not done when it works, you're done when it's right.

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #17 on: December 08, 2021, 09:58:35 pm »
I feel I need to elaborate a little more.  Look at the second image and pay attention
to the 0110 patterns within the results string that are highlighted in green.  Counting
the one I missed there are 9.  The data flows from right to left with the latest entries
on the left.  If we look at the results string from right to left we notice that the following
digit after each 0110 pattern is a (1).  This is what I would classify as an Expert. 

I would have no reservations predicting digit 1 as the next value in the string.  Each
string has to be analyzed to try and find it's own expert.  And each expert should be
assigned a confidence level between 0 and .99.  It's also that more than one expert
can be found through our analysis.  The search pattern should always be taken from
the left most part of the string because that's what we are looking for to make the
next prediction.   The experts if any will change day to day most of the time so it's
important to be able to find them on the fly so to say. 

The possibilities are almost limitless as to what we might use to construct a prediction
model so try to think outside the box.  Anyway, I hope the information I have presented
here helps to kick start other ideas.

R1     
           

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #18 on: December 08, 2021, 10:04:15 pm »
I'll keep looking at what you're attempting but do you not agree that the program above assigns "0110" a somewhat high "score"? (It would be on the previous screen, not in the screenshot itself, which has the 5 digit analysis.) There are few more common strings, such as "0000", so that truth is up there too.

Let me ask, what is the end result of this? You want an Eliza-like program that tries to guess what my next number is, and then honestly reports the guess after I finally make my choice? Cause that's where I thought you were going.
You're not done when it works, you're done when it's right.

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #19 on: December 08, 2021, 10:09:47 pm »
 STxAxTIC

I will have to look up the string I posted to see what the next value was as it's been
updated a couple times since I posted it.  I should have kept a note of which string I
used.  My program copies each string I look at to the clipboard automatically and I
just selected one at random.  If/when you finish your code so that it makes a 0 or 1
prediction I will run it against all 800 + strings and report back to it's overall hit rate.
Many thanks for posting.

R1

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #20 on: December 08, 2021, 10:28:43 pm »
The main goal is to produce a universal prediction tool.  The 0110 is nothing more than
the values of the last 4 entries.  The string changes day to day and when using the first
4 digits then we have 16 possibilities but each day the sequence is determined by the
events I track.  Each string is updated daily by adding a 0 or 1 to the string.  if the event
accrued then a 1 is added if not then a 0.  The reason I mentioned the old program  was
my interest in the algorithm it used.  I was wondering how it would stack up as a predictor
against my data.  Instead of me imputing one digit at a time I would feed it a string of
3k to 5k in length and see how successful it was.   It seems to me if the method it used
could predict my next choice then given enough data it might be useful to my current
project.  I am not building a game, I wanted to repurpose the code into something useful. 
 
Sorry if I was not clear in this.

R1

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #21 on: December 08, 2021, 10:50:03 pm »
P.S.  I track over 800 events each day so I have over 800 strings that I try to predict.
Standard prediction tools don't work, I've tried all sorts of methods and figure I needed
to start thinking outside the box if it's going to be successful.

Anyway, that's where I am at.   My last attempt failed and it was sometimes hitting
over 80% correct.  The problem was that the tool was not consistent enough to meet
my needs. This has been a ongoing project that I have been working on for years.

R1   

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #22 on: December 08, 2021, 11:32:10 pm »
I may have to do a video or something on this because the details are getting a bit hard to convey. Anyway, I updated the code to be much more powerful, and I'm attaching a screenshot that outlines one possible good analysis. If we want to continue this, we need to pick a dataset that we'll both use and come up with definite questions about the data that we could use our methods to answer. (Statistical stuff can't really be trusted.) Anyway, here's where it stands on my end. I may do something less lazy than a weighted average at the end, but for now it's getting there:

Code: QB64: [Select]
  1. Type Letter
  2.     Signature As String
  3.     Count As Integer
  4.  
  5. Dim Shared Alphabet1(2) As Letter
  6. Alphabet1(1).Signature = "0"
  7. Alphabet1(2).Signature = "1"
  8.  
  9. Dim Shared Alphabet2(4) As Letter
  10. Dim Shared Alphabet3(8) As Letter
  11. Dim Shared Alphabet4(16) As Letter
  12. Dim Shared Alphabet5(32) As Letter
  13. Dim Shared Alphabet6(64) As Letter
  14. Dim Shared Alphabet7(128) As Letter
  15. Dim Shared Alphabet8(256) As Letter
  16.  
  17. Call NewAlphabet(Alphabet1(), Alphabet2())
  18. Call NewAlphabet(Alphabet2(), Alphabet3())
  19. Call NewAlphabet(Alphabet3(), Alphabet4())
  20. Call NewAlphabet(Alphabet4(), Alphabet5())
  21. Call NewAlphabet(Alphabet5(), Alphabet6())
  22. Call NewAlphabet(Alphabet6(), Alphabet7())
  23. Call NewAlphabet(Alphabet7(), Alphabet8())
  24.  
  25. Dim Shared FingerPrint(16) As String
  26.  
  27. 'FingerPrint(1) = "010010010100100101010100101010101010101010101101101010101001111101010101010101010101001010101010"
  28. FingerPrint(1) = "0001000001011100000011000100011000010010000000000000000011000000000000000001110010000000000001111000000001001110000000000000100000000011110000000000000000000000000000010100000000000000000100000000000000110001111000010001000000000000000000011010000000000000000010001101100000100001000000110011000011010010000000000000000000100001000011000110001010000000100000000000000000000000000000000000010000000000100000000000000010100000100000000000000000000000000000000000100001000000000000000010110100000000000010010000000000000000000100000000001100000011000000000000000000000000000000110010000110000100000"
  29.  
  30. For n = 2 To UBound(FingerPrint)
  31.     FingerPrint(n) = Right$(FingerPrint(n - 1), Len(FingerPrint(n - 1)) - 1) + Left$(FingerPrint(n - 1), 1)
  32.  
  33. Call UpdateHisto(Alphabet2(), 2)
  34. Call PrintHisto(Alphabet2())
  35.  
  36. Call UpdateHisto(Alphabet3(), 3)
  37. Call PrintHisto(Alphabet3())
  38.  
  39. Call UpdateHisto(Alphabet4(), 4)
  40. Call PrintHisto(Alphabet4())
  41.  
  42. Call UpdateHisto(Alphabet5(), 5)
  43. Call PrintHisto(Alphabet5())
  44.  
  45. Call UpdateHisto(Alphabet6(), 6)
  46. Call PrintHisto(Alphabet6())
  47.  
  48. Call UpdateHisto(Alphabet7(), 7)
  49. Call PrintHisto(Alphabet7())
  50.  
  51. Call UpdateHisto(Alphabet8(), 8)
  52. Call PrintHisto(Alphabet8())
  53.  
  54.  
  55. Sub UpdateHisto (arr() As Letter, w As Integer)
  56.     For m = 1 To w
  57.         For n = 1 To Len(FingerPrint(m)) Step w
  58.             a$ = Mid$(FingerPrint(m), n, w)
  59.             For k = 1 To UBound(arr)
  60.                 If a$ = arr(k).Signature Then
  61.                     arr(k).Count = arr(k).Count + 1
  62.                 End If
  63.             Next
  64.         Next
  65.     Next
  66.  
  67. Sub PrintHisto (arr() As Letter)
  68.     Call BubbleSort(arr())
  69.     For k = UBound(arr) To 1 Step -1
  70.         Print arr(k).Signature; arr(k).Count
  71.     Next
  72.     Sleep
  73.     Cls
  74.  
  75. Sub NewAlphabet (arrold() As Letter, arrnew() As Letter)
  76.     n = 0
  77.     For j = 1 To 2
  78.         For k = 1 To UBound(arrold)
  79.             n = n + 1
  80.             arrnew(n).Signature = arrold(k).Signature
  81.         Next
  82.     Next
  83.     For k = 1 To UBound(arrnew)
  84.         If k <= UBound(arrnew) / 2 Then
  85.             arrnew(k).Signature = "0" + arrnew(k).Signature
  86.         Else
  87.             arrnew(k).Signature = "1" + arrnew(k).Signature
  88.         End If
  89.     Next
  90.  
  91. Sub BubbleSort (arr() As Letter)
  92.     Dim As Integer i, j
  93.     Dim As Double u, v
  94.     For j = UBound(arr) To 1 Step -1
  95.         For i = 2 To UBound(arr)
  96.             u = arr(i - 1).Count
  97.             v = arr(i).Count
  98.             If (u < v) Then
  99.                 Swap arr(i - 1), arr(i)
  100.             End If
  101.         Next
  102.     Next

  [ You are not allowed to view this attachment ]  
« Last Edit: December 08, 2021, 11:40:22 pm by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • Steve’s QB64 Archive Forum
Re: Looking for old program or help recreating it
« Reply #23 on: December 09, 2021, 12:42:58 am »
What you're trying to do, it sounds like, is basically what this guy over at Numberphile talks about.  Take a look at the video.  I think you might like it and it might give you some insight into what your program needs to have to be a human sequence tester.

https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #24 on: December 09, 2021, 01:47:53 am »
Yeah, this guy's ^ in the same ballpark, mostly. This whole topic does make me sigh just a little, like am I the only one who remembers doing work like this with you guys (Steve, bplus) like 2 years ago? We were able to detect ordered strings hidden in a bunch of randomness. That old problem, the video above, the present problem - all the same ballpark. In fact, the topic of the video is quite a bit simpler than the thing we're doing. (Just run the guy's string of H and T through my code and see the uneven distributions.) Anyway, thanks for bringing that up Steve. I'm gonna keep playing this this 'cause I'm not sure if I'm being thorough enough in my explanations.
You're not done when it works, you're done when it's right.

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #25 on: December 09, 2021, 07:39:45 am »
Okay so @random1...

For the sake of setting the bar somewhere, consider this data set:

Code: [Select]
string = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": nextdigit = "0"
'
string = "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101": nextdigit = "0"
string = "10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010": nextdigit = "1"
'
string = "00100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100": nextdigit = "1"
string = "01001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001": nextdigit = "0"
string = "10010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010": nextdigit = "0"
'
string = "00010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001": nextdigit = "0"
string = "00100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010": nextdigit = "0"
string = "01000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100": nextdigit = "0"
string = "10001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000": nextdigit = "1"
'
string = "00001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000": nextdigit = "0"
string = "00010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000": nextdigit = "1"
string = "00100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001": nextdigit = "0"
string = "01000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010": nextdigit = "0"
string = "10000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100": nextdigit = "0"
'
string = "00000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100": nextdigit = "0"
string = "00001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000": nextdigit = "0"
string = "00010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000": nextdigit = "0"
string = "00100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000": nextdigit = "1"
string = "01000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001": nextdigit = "0"
string = "10000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010": nextdigit = "0"
'
string = "00000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100": nextdigit = "0"
string = "00100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000": nextdigit = "1"
'
string = "00000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001": nextdigit = "0"
string = "10000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000": nextdigit = "1"
'
string = "00110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011": nextdigit = "0"
string = "01100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110": nextdigit = "0"
string = "11001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100": nextdigit = "1"
string = "10011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001": nextdigit = "1"
'
string = "00011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100": nextdigit = "0"
string = "00111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000": nextdigit = "1"
string = "01110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001": nextdigit = "1"
string = "11100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011": nextdigit = "1"
string = "11000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111": nextdigit = "0"
string = "10001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110": nextdigit = "0"
'
string = "01001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100": nextdigit = "0"
string = "10011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000": nextdigit = "1"
string = "00110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001": nextdigit = "1"
string = "01100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011": nextdigit = "1"
string = "11000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111": nextdigit = "0"
string = "10001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110": nextdigit = "1"
string = "00011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101": nextdigit = "0"
'
string = "01001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001": nextdigit = "0"
string = "10010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010": nextdigit = "1"
string = "00101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101": nextdigit = "0"
string = "01010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010": nextdigit = "1"
string = "10101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101": nextdigit = "0"
string = "01010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010": nextdigit = "1"
string = "10101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101": nextdigit = "0"
string = "01010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010": nextdigit = "0"
string = "10101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100": nextdigit = "0"
string = "01010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000": nextdigit = "1"
string = "10100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001": nextdigit = "1"

What we've got is a nice bunch of patterns of zero and ones. In each case, even for the ugly later cases, there is always a pattern going on, and I specified the correct next digit in a separate string. This is the kind of data set I would need to test a method I would come up with. Come up with a guess, square it off against the known result. So before reading on, my fast question to you is: How well will your methods predict the so-called "next digit" in each of these? Will that take long? Give it a shot for me.

-----

The code below gets every single one of those examples correct, with the exception of *one* case, and that's because I had to nerf my code down to make sure it wasn't somehow giving an "always right" bug. I needed to see *one* mistake take place, so I contrived a case that I knew could trick it (it takes place right before the end). Alas, it doesn't need to be this way, there is no flaw in the method that I can see - it'll just have to run slightly slower to be 100% perfect. But anyway, here is the bar. Call it 99% "perfect" for the data being used:

Code: QB64: [Select]
  1. Type Letter
  2.     Signature As String
  3.     Count As Integer
  4.  
  5. Dim Shared FingerPrint(16) As String
  6.  
  7. Dim Shared Alphabet1(2) As Letter
  8. Alphabet1(1).Signature = "0"
  9. Alphabet1(2).Signature = "1"
  10.  
  11. Dim Shared Alphabet2(4) As Letter
  12. Dim Shared Alphabet3(8) As Letter
  13. Dim Shared Alphabet4(16) As Letter
  14. Dim Shared Alphabet5(32) As Letter
  15. Dim Shared Alphabet6(64) As Letter
  16. Dim Shared Alphabet7(128) As Letter
  17. Dim Shared Alphabet8(256) As Letter
  18. Dim Shared Alphabet9(512) As Letter
  19. Dim Shared Alphabet10(1024) As Letter
  20. Dim Shared Alphabet11(2048) As Letter
  21. Dim Shared Alphabet12(4096) As Letter
  22. 'Dim Shared Alphabet13(8192) As Letter
  23.  
  24. Call NewAlphabet(Alphabet1(), Alphabet2())
  25. Call NewAlphabet(Alphabet2(), Alphabet3())
  26. Call NewAlphabet(Alphabet3(), Alphabet4())
  27. Call NewAlphabet(Alphabet4(), Alphabet5())
  28. Call NewAlphabet(Alphabet5(), Alphabet6())
  29. Call NewAlphabet(Alphabet6(), Alphabet7())
  30. Call NewAlphabet(Alphabet7(), Alphabet8())
  31. Call NewAlphabet(Alphabet8(), Alphabet9())
  32. Call NewAlphabet(Alphabet9(), Alphabet10())
  33. Call NewAlphabet(Alphabet10(), Alphabet11())
  34. Call NewAlphabet(Alphabet11(), Alphabet12())
  35. 'Call NewAlphabet(Alphabet12(), Alphabet13())
  36.  
  37. n = 0
  38. ReDim Shared TheInput(1000, 2) As String
  39.  
  40. n = n + 1: TheInput(n, 1) = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000": TheInput(n, 2) = "0"
  41. '
  42. n = n + 1: TheInput(n, 1) = "01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101": TheInput(n, 2) = "0"
  43. n = n + 1: TheInput(n, 1) = "10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010": TheInput(n, 2) = "1"
  44. '
  45. n = n + 1: TheInput(n, 1) = "00100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100100": TheInput(n, 2) = "1"
  46. n = n + 1: TheInput(n, 1) = "01001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001001": TheInput(n, 2) = "0"
  47. n = n + 1: TheInput(n, 1) = "10010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010010": TheInput(n, 2) = "0"
  48. '
  49. n = n + 1: TheInput(n, 1) = "00010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001": TheInput(n, 2) = "0"
  50. n = n + 1: TheInput(n, 1) = "00100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010": TheInput(n, 2) = "0"
  51. n = n + 1: TheInput(n, 1) = "01000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100": TheInput(n, 2) = "0"
  52. n = n + 1: TheInput(n, 1) = "10001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000": TheInput(n, 2) = "1"
  53. '
  54. n = n + 1: TheInput(n, 1) = "00001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000": TheInput(n, 2) = "0"
  55. n = n + 1: TheInput(n, 1) = "00010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000": TheInput(n, 2) = "1"
  56. n = n + 1: TheInput(n, 1) = "00100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001": TheInput(n, 2) = "0"
  57. n = n + 1: TheInput(n, 1) = "01000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010": TheInput(n, 2) = "0"
  58. n = n + 1: TheInput(n, 1) = "10000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100": TheInput(n, 2) = "0"
  59. '
  60. n = n + 1: TheInput(n, 1) = "00000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100": TheInput(n, 2) = "0"
  61. n = n + 1: TheInput(n, 1) = "00001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000": TheInput(n, 2) = "0"
  62. n = n + 1: TheInput(n, 1) = "00010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000": TheInput(n, 2) = "0"
  63. n = n + 1: TheInput(n, 1) = "00100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000100000": TheInput(n, 2) = "1"
  64. n = n + 1: TheInput(n, 1) = "01000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001000001": TheInput(n, 2) = "0"
  65. n = n + 1: TheInput(n, 1) = "10000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010000010": TheInput(n, 2) = "0"
  66. '
  67. n = n + 1: TheInput(n, 1) = "00000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100": TheInput(n, 2) = "0"
  68. n = n + 1: TheInput(n, 1) = "00100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000100000010000001000000": TheInput(n, 2) = "1"
  69. '
  70. n = n + 1: TheInput(n, 1) = "00000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001": TheInput(n, 2) = "0"
  71. n = n + 1: TheInput(n, 1) = "10000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000000": TheInput(n, 2) = "1"
  72. '
  73. n = n + 1: TheInput(n, 1) = "00110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011": TheInput(n, 2) = "0"
  74. n = n + 1: TheInput(n, 1) = "01100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110": TheInput(n, 2) = "0"
  75. n = n + 1: TheInput(n, 1) = "11001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100": TheInput(n, 2) = "1"
  76. n = n + 1: TheInput(n, 1) = "10011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001": TheInput(n, 2) = "1"
  77. '
  78. n = n + 1: TheInput(n, 1) = "00011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100": TheInput(n, 2) = "0"
  79. n = n + 1: TheInput(n, 1) = "00111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000": TheInput(n, 2) = "1"
  80. n = n + 1: TheInput(n, 1) = "01110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001": TheInput(n, 2) = "1"
  81. n = n + 1: TheInput(n, 1) = "11100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011100011": TheInput(n, 2) = "1"
  82. n = n + 1: TheInput(n, 1) = "11000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111000111": TheInput(n, 2) = "0"
  83. n = n + 1: TheInput(n, 1) = "10001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110001110": TheInput(n, 2) = "0"
  84. '
  85. n = n + 1: TheInput(n, 1) = "01001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100": TheInput(n, 2) = "0"
  86. n = n + 1: TheInput(n, 1) = "10011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000": TheInput(n, 2) = "1"
  87. n = n + 1: TheInput(n, 1) = "00110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001": TheInput(n, 2) = "1"
  88. n = n + 1: TheInput(n, 1) = "01100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011": TheInput(n, 2) = "1"
  89. n = n + 1: TheInput(n, 1) = "11000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111010011000111": TheInput(n, 2) = "0"
  90. n = n + 1: TheInput(n, 1) = "10001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110100110001110": TheInput(n, 2) = "1"
  91. n = n + 1: TheInput(n, 1) = "00011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101001100011101": TheInput(n, 2) = "0"
  92. '
  93. n = n + 1: TheInput(n, 1) = "01001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001": TheInput(n, 2) = "0" '0
  94. n = n + 1: TheInput(n, 1) = "10010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010": TheInput(n, 2) = "1" '1
  95. n = n + 1: TheInput(n, 1) = "00101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101": TheInput(n, 2) = "0" '0
  96. n = n + 1: TheInput(n, 1) = "01010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010": TheInput(n, 2) = "1" '1
  97. n = n + 1: TheInput(n, 1) = "10101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101": TheInput(n, 2) = "0" '0
  98. n = n + 1: TheInput(n, 1) = "01010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010": TheInput(n, 2) = "1" '1
  99. n = n + 1: TheInput(n, 1) = "10101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101": TheInput(n, 2) = "0" '0
  100. n = n + 1: TheInput(n, 1) = "01010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010": TheInput(n, 2) = "0" '0
  101. n = n + 1: TheInput(n, 1) = "10101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100": TheInput(n, 2) = "0" '0
  102. n = n + 1: TheInput(n, 1) = "01010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001110100101010101001010101000": TheInput(n, 2) = "1" '1
  103. n = n + 1: TheInput(n, 1) = "10100101010100011101001010101010010101010001110100101010101001010101000111010010101010100101010100011101001010101010010101010001": TheInput(n, 2) = "1" '1
  104. '
  105. n = n + 1: TheInput(n, 1) = "0001000001011100000011000100011000010010000000000000000011000000000000000001110010000000000001111000000001001110000000000000100000000011110000000000000000000000000000010100000000000000000100000000000000110001111000010001000000000000000000011010000000000000000010001101100000100001000000110011000011010010000000000000000000100001000011000110001010000000100000000000000000000000000000000000010000000000100000000000000010100000100000000000000000000000000000000000100001000000000000000010110100000000000010010000000000000000000100000000001100000011000000000000000000000000000000110010000110000100000": TheInput(n, 2) = "?"
  106. '
  107.  
  108. For m = 1 To n
  109.  
  110.     FingerPrint(1) = TheInput(m, 1)
  111.  
  112.     For k = 2 To UBound(FingerPrint)
  113.         FingerPrint(k) = Right$(FingerPrint(k - 1), Len(FingerPrint(k - 1)) - 1) + Left$(FingerPrint(k - 1), 1)
  114.     Next
  115.  
  116.     Call CreateHisto(Alphabet2(), 2)
  117.     'Call PrintHisto(Alphabet2())
  118.     p2 = MakeGuess(Alphabet2(), 2)
  119.  
  120.     Call CreateHisto(Alphabet3(), 3)
  121.     'Call PrintHisto(Alphabet3())
  122.     p3 = MakeGuess(Alphabet3(), 3)
  123.  
  124.     Call CreateHisto(Alphabet4(), 4)
  125.     'Call PrintHisto(Alphabet4())
  126.     p4 = MakeGuess(Alphabet4(), 4)
  127.  
  128.     Call CreateHisto(Alphabet5(), 5)
  129.     'Call PrintHisto(Alphabet5())
  130.     p5 = MakeGuess(Alphabet5(), 5)
  131.  
  132.     Call CreateHisto(Alphabet6(), 6)
  133.     'Call PrintHisto(Alphabet6())
  134.     p6 = MakeGuess(Alphabet6(), 6)
  135.  
  136.     Call CreateHisto(Alphabet7(), 7)
  137.     'Call PrintHisto(Alphabet7())
  138.     p7 = MakeGuess(Alphabet7(), 7)
  139.  
  140.     Call CreateHisto(Alphabet8(), 8)
  141.     'Call PrintHisto(Alphabet8())
  142.     p8 = MakeGuess(Alphabet8(), 8)
  143.  
  144.     Call CreateHisto(Alphabet9(), 9)
  145.     'Call PrintHisto(Alphabet9())
  146.     p9 = MakeGuess(Alphabet9(), 9)
  147.  
  148.     Call CreateHisto(Alphabet10(), 10)
  149.     'Call PrintHisto(Alphabet10())
  150.     p10 = MakeGuess(Alphabet10(), 10)
  151.  
  152.     Call CreateHisto(Alphabet11(), 11)
  153.     'Call PrintHisto(Alphabet11())
  154.     p11 = MakeGuess(Alphabet11(), 11)
  155.  
  156.     Call CreateHisto(Alphabet12(), 12)
  157.     'Call PrintHisto(Alphabet12())
  158.     p12 = MakeGuess(Alphabet12(), 12)
  159.  
  160.     'Call CreateHisto(Alphabet13(), 13)
  161.     'Call PrintHisto(Alphabet13())
  162.     'p13 = MakeGuess(Alphabet13(), 13)
  163.  
  164.     Cls
  165.     Print "String:"
  166.     Print FingerPrint(1)
  167.     Print
  168.     Print "Predicted:"; p12
  169.     Print "Actual:    "; TheInput(m, 2)
  170.     'Print
  171.     'Print p2; p3; p4; p5; p6; p7; p8; p9; p10; p11; p12; p13
  172.     Sleep
  173.  
  174.  
  175.  
  176. Function MakeGuess (arr() As Letter, w As Integer)
  177.     Dim TheReturn As Integer
  178.     x$ = Right$(FingerPrint(1), w - 1)
  179.     For k = 1 To UBound(arr)
  180.         If Left$(arr(k).Signature, w - 1) = x$ Then
  181.             'Print "..."; arr(k).Signature
  182.             TheReturn = Val(Right$(arr(k).Signature, 1))
  183.             Exit For
  184.         End If
  185.     Next
  186.     MakeGuess = TheReturn
  187.  
  188. Sub CreateHisto (arr() As Letter, w As Integer)
  189.     For m = 1 To w
  190.         For n = 1 To Len(FingerPrint(m)) Step w
  191.             a$ = Mid$(FingerPrint(m), n, w)
  192.             For k = 1 To UBound(arr)
  193.                 If a$ = arr(k).Signature Then
  194.                     arr(k).Count = arr(k).Count + 1
  195.                 End If
  196.             Next
  197.         Next
  198.     Next
  199.     Call BubbleSort(arr())
  200.  
  201. Sub PrintHisto (arr() As Letter)
  202.     For k = 1 To 3
  203.         Print arr(k).Signature; arr(k).Count
  204.     Next
  205.  
  206. Sub NewAlphabet (arrold() As Letter, arrnew() As Letter)
  207.     n = 0
  208.     For j = 1 To 2
  209.         For k = 1 To UBound(arrold)
  210.             n = n + 1
  211.             arrnew(n).Signature = arrold(k).Signature
  212.         Next
  213.     Next
  214.     For k = 1 To UBound(arrnew)
  215.         If k <= UBound(arrnew) / 2 Then
  216.             arrnew(k).Signature = "0" + arrnew(k).Signature
  217.         Else
  218.             arrnew(k).Signature = "1" + arrnew(k).Signature
  219.         End If
  220.     Next
  221.  
  222. Sub BubbleSort (arr() As Letter)
  223.     Dim As Integer i, j
  224.     Dim As Double u, v
  225.     For j = UBound(arr) To 1 Step -1
  226.         For i = 2 To UBound(arr)
  227.             u = arr(i - 1).Count
  228.             v = arr(i).Count
  229.             If (u < v) Then
  230.                 Swap arr(i - 1), arr(i)
  231.             End If
  232.         Next
  233.     Next
« Last Edit: December 09, 2021, 07:48:58 am by STxAxTIC »
You're not done when it works, you're done when it's right.

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #26 on: December 09, 2021, 09:49:57 am »
SMcNeill

The video you posted is on target and a big goal is avoiding the gamblers fallacy like a plague.

Thanks for posting 
 



 

Offline random1

  • Newbie
  • Posts: 86
Re: Looking for old program or help recreating it
« Reply #27 on: December 09, 2021, 10:52:31 am »
STxAxTIC

The strings you show do not have any random elements except for the mentioned.
My approach at this would be a basic counter loop with a quick decimal to binary
converter.  Use an array to store the counts.  Running averages is something I use
but by itself it's not enough to make a solid prediction when the data can be some-
what random.   The video SMcNeill posted shows where I am at and also explains
where the 3rd state comes in, a wild card that skips whenever no clear prediction
can be made. 
Please don't think I am downplaying your input, I am not.  Lets say that we start
with the right most digit in the string and from that value we try to predict the
digit to the left of it.  We then check the prediction against the second leftmost
digit.  Next we add the second digit to the first so that we now have 2 digits to
use in making the next prediction and so on and on. 
If the data does not contain any random data, then as soon as the length of the
pattern is determined it's a no brain'er from that point.  The direction I am headed
is to create a self adapting algorithm to minimize the error, not exactly a neural
network but close.  It seems simple enough until one starts coding.  My thoughts
are to combine several such algorithms into a single predictor using all the outputs
to make the prediction.  The running average is already part of the project.   The
speed of the code is not that important as long as were not talking hours, my current
code takes around 45 seconds to process 800+ strings which includes 2 graphics.

Picture
Green graph shows single string process and pink shows overrall

https://i.postimg.cc/9fqHZchS/splash.png

R1   
 
 
« Last Edit: December 09, 2021, 11:05:28 am by random1 »

Offline Dimster

  • Forum Resident
  • Posts: 500
Re: Looking for old program or help recreating it
« Reply #28 on: December 09, 2021, 11:05:51 am »
Just trying to determine if you are trying to predict an event or predict the behavior of a person?

Quote
The main goal is to produce a universal prediction tool.  The 0110 is nothing more than
the values of the last 4 entries.  The string changes day to day and when using the first
4 digits then we have 16 possibilities but each day the sequence is determined by the
events I track.  Each string is updated daily by adding a 0 or 1 to the string.  if the event
accrued then a 1 is added if not then a 0.

Events of nature are truly random but a persons behavior may be predictable.

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
Re: Looking for old program or help recreating it
« Reply #29 on: December 09, 2021, 12:42:00 pm »
Yeah, I kinda figured this would happen.

random1, my method works on random strings also - of course - we need to TEST things with regularized input before we give the algorithm true unknowns.

IF you can't run your stuff on my test data, or won't, the way it really sounds, then Im considering this issue closed and you guys have some reading to do!

Please, let's see how your attempt handles the data I provided. No speculation about it, let's see a test.
You're not done when it works, you're done when it's right.