def buildHL0bTrainingSet(numOnes=<NUM_LIT:5>):
numPatterns = <NUM_LIT><EOL>p = getSimplePatterns(numOnes, numPatterns)<EOL>s = []<EOL>s.append(p[rgen.randint(<NUM_LIT:5>,numPatterns)])<EOL>for i in range(<NUM_LIT:50>):<EOL><INDENT>r = rgen.randint(<NUM_LIT:5>,numPatterns)<EOL>print(r, end='<STR_LIT:U+0020>')<EOL>s.append(p[r])<EOL>if rgen.binomial(<NUM_LIT:1>, <NUM_LIT:0.5>) > <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>", end='<STR_LIT:U+0020>')<EOL>s.append(p[<NUM_LIT:0>])<EOL>s.append(p[<NUM_LIT:1>])<EOL>s.append(p[<NUM_LIT:2>])<EOL>s.append(p[<NUM_LIT:4>])<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>", end='<STR_LIT:U+0020>')<EOL>s.append(p[<NUM_LIT:1>])<EOL>s.append(p[<NUM_LIT:2>])<EOL>s.append(p[<NUM_LIT:3>])<EOL><DEDENT>r = rgen.randint(<NUM_LIT:5>,numPatterns)<EOL>s.append(p[r])<EOL>print(r, end='<STR_LIT:U+0020>')<EOL><DEDENT>print()<EOL>return ([s], [ [p[<NUM_LIT:0>], p[<NUM_LIT:1>], p[<NUM_LIT:2>], p[<NUM_LIT:4>]],  [p[<NUM_LIT:1>], p[<NUM_LIT:2>], p[<NUM_LIT:3>]] ])<EOL>
Simple sequences for HL0b. Each pattern in the sequence has a series of 1's
    in a specific set of columns.
      There are 23 patterns, p0 to p22.
      The sequences we want to learn are p1->p2->p3 and p0->p1->p2->p4.
      We create a very long sequence consisting of these two sub-sequences
      intermixed with noise, such as:
            N N p0 p1 p2 p4 N N p1 p2 p3 N N p1 p2 p3
      N is randomly chosen from p5 to p22