html5-img
1 / 38

Evolvable Random Number Generators

Evolvable Random Number Generators. Jason Isaacs, Robert Watkins, Shonda Walker, Terita Norton, Petra Robinson, Simon Foo FAMU-FSU College of Engineering Tallahassee, Florida USA. Our Project Goal :

dillon
Download Presentation

Evolvable Random Number Generators

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Evolvable Random Number Generators Jason Isaacs, Robert Watkins, Shonda Walker, Terita Norton, Petra Robinson, Simon Foo FAMU-FSU College of Engineering Tallahassee, Florida USA A5

  2. Our Project Goal: to design and implement a genetic algorithm (GA)-based random number generator (RNG) on a reconfigurable field programmable gate array (FPGA). A5

  3. A Genetic Algorithm is an evolutionary optimization technique wherein solutions compete in a survival of the fittest tournament • Each solution is numerically encoded to a chromosome • Each chromosome is rated for fitness • Fit chromosomes reproduce (with variations) • The process is repeated for many generations A5

  4. <01001110> <01101011> <01101110> <01001011> <01001110> <01011110> Recombination Techniques Given two 8-bit chromosomes <01001110> and <01101011>. Crossover: single-point crossover at the third locus. Mutation: single-point with random probability ~ 0.02% for our case. Inversion: not a widely used technique. <01101011> <10010100> A5

  5. Reproduction Crossover operations are an extremely important component of a genetic algorithm. Without it a genetic algorithm is no longer a genetic algorithm. This can not be said of mutation operators. Mutation operators are important only to reintroduce diversity into a population and prevent localization. We can use combinations of these methods to ensure a broader query and prevent premature convergence. A5

  6. TrueRandom Number Generators:tap source of natural randomness; digits are often poorly distributed RNGs An ideal Random Number Generator (RNG), produces an infinite string of digits which are uncorrelated and uniformly distributed Quasi-Random Number Generators (QRNG):produce uniformly distributed digits; considered appropriate for Monte Carlo simulations Pseudo-Random Number Generators (PRNG): no detectable biases or correlations; suitable for cryptographic purposes A5

  7. FIPS 140: 200,000 bits, subjected to each of the following tests. If any of the tests fail, then the generator fails the test. Monobit test: number of 0's or 1's is between 99654 and 100346 Poker test: statistic, X, is between 1.03 to 57.4 X depends on the number of occurrences of each four bit word. (for increased stringency: 8-bit words) Runs test: blocks and gaps of length n between 1 and 6 are compared to a look-up table to determine acceptable ranges. (For the purpose of this test, all runs/gaps of length greater than 6 are counted together) Long run test. The long run test is passed if there are no runs of length 34 or more. A5

  8. Diehard Diehard is a statistical test suite, developed by George Marsaglia, and widely recognized as among the most stringent tests of randomness. BIRTHDAY SPACINGS OPERM5 31x31 BINARY RANK 32x32 BINARY RANK 6x8 BINARY RANK BITSTREAM OPSO OQSO DNA COUNT-THE-1's COUNT-THE-1's (specific bytes) PARKING LOT MINIMUM DISTANCE 3D SPHERES SQUEEZE OVERLAPPING SUMS RUNS CRAPS A5

  9. Hardware • XESS board • Xilinx Virtex FPGA 800k • Xilinx XC95108 CPLD • 16 Mbit Flash RAM • Two independent 512K x 16 SRAM banks used by the FPGA for general purpose storage • RAMDAC with a 265-entry, 24-bit color map used by the FPGA to output video to a VGA monitor • Common input device accessibility A5

  10. XSV-800s A5

  11. Evolvable Random Number Generators: A Schemata-based Approach A5

  12. Some commonRNG: LCGs - Linear Congruential Generators: xn+1 = a xn + b (mod m); LCG( m, a, b, x0 ), 0 < a, b < m Shift & XOR Generators: Any of various generators based on schemes for shifting and XORing input stream(s) or seeded array(s); other operations are often included (e.g. RC4 and ISAAC). ICGs - Inversive Congruential Generators: xn+1 = a (xn)-1 + b (mod p) ICG( p, a, b, x0 ), with p prime, 0 < a, b < p, and (xn)-1 indicates the inverse of xn mod p Lagged Fibonacci Generators: xn= xn-r + xn-s (mod m) LFG( m, r, s, x0, x1, x2,... xs) A5

  13. yn+k= k-1j=0 MRG * ajyn+j mod m c xn+1= xor cLCG yn+1= + ICG * * * * b mod p + + a ūn mod 235 mod 235 d c bxi axi Example Schemata-based GA RNG Structures A5

  14. yn+k= yn+k= k-1j=0 k-1j=0 MRG MRG * * ajyn+j ajyn+j mod m mod m * c xn+1= xn+1= xor xor cLCG cLCG yn+1= + * * ICG * * * * * b + + mod p + + + a mod 235 mod 235 ūn mod 235 mod 235 mod 235 d d bxi bxi d c c bxi axi axi Example Schemata-based GA RNG Structures A5

  15. Fips Score Schemata based GARNG Gene Given: Actual RNG Structures |0|1|1|5|9|9|12|3|3|6|5|5|7|0|10|14|14|13|13|6|0|4|15|10|7|2|7|20|66| Decoded: A5

  16. Average Performance over 100 Generations using a Tournament Selection Mechanism A5

  17. Diehard vs. Fips GA-Schemata: 16-bit A5

  18. Diehard vs. Fips GA-Schemata: 20-bit A5

  19. Schemata-based GA-RNG Conclusions • Modifications • 150 Reassignment RNG added • User selected crossover method • Lengthened gene and enlarged population • Roulette, Elitist, Tournament, and Random-Site Tournament • Performance Update • Better performance with 150 Re-RNG than implementation with C++ RNG • Longer gene improved performance • Larger population allowed faster convergence to “good” solutions • Improved performance on Diehard with use of 20-bit numbers • Barriers to full FPGA implementation • Decoder size • Complex mathematical functions • Large prime number storage and use A5

  20. CellularAutomata (CA) Pseudo-Random Number Generators (PRNG): A5

  21. 1 0 0 Each successive set of array values is referred to as a ‘state’. 1 There are 8 pre-images 111 110 101 100 011 010 001 000 1 0 0 1 0 1 1 0 One-dimensional Cellular Automata In cellular automata, discrete values assigned to an array of sites are change synchronously in discrete time steps by applying local rules. State change rules are defined on neighborhoods, here n=3 = 150base2 A5

  22. 1 1 0 elementary 1D CA rules 3 2 = 256 1 1 0 2 1 0 0 elementary 2D CA rules 0 9 2 1051 2 Increased complexity of 2 dimensional CA A5

  23. 3 methods for mapping 1D CA rules to 2D CA Method 1: 2512 possible rules Method 2: 224 possible rules Method 3: 232 possible rules A5

  24. Various 1 & 2D CA implementations (1) Single-site initial state. (2) Disordered initial state. Temporal state-space diagrams for 1D CA are evolved from the initial state through 250 time steps. The 2D CA diagrams are snapshots of the grid from initialization through t = 250 in steps of 50 generations. A5

  25. FIPS-140 performance for various 1 & 2D CA implementations A5

  26. Performance Metrics for Hardware Implementations Note: comparable performance of Method 2 on all metrics to 1D CAs A5

  27. Evolvable Ant Colony Systems A5

  28. Potential Strengths of Ant Colony Based PRNG • Ease of implementation (Boolean/arithmetic). • Biological model provides intuition in development and increased gene pool. • Possible implementation of multiple species/castes with cooperative/competitive fitness functions. A5

  29. How does the Ant Colony produce Random Numbers? • The ants roam freely gathering and distributing food. • The distribution of the food within the environment determines the set of random digits for each cycle. • This procedure is repeated until the colony has generated 200,000 bits (the number of bits required for fitness testing). A5

  30. f: MFOOD{0,1}n A5

  31. Fitness Ant Movement Range Colony Pickup Scaling Factor Colony Drop-off Scaling Factor • |1|1|1|2|2|1|1|2|3|1|3|1|3|3|3|3|3|3|3|3|3|3|1|0|1|1|1|1|1|0|0|0|0|0|1|1|0|0|0|1|1|0|60| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 3 6 7 6 3 1 3 6 12 12 12 6 3 0 0 0 0 0 0 0 0 1 2 3 2 1 0 6 12 27 27 27 12 6 0 0 1 1 1 0 0 0 2 2 4 2 2 0 7 12 27 32 27 12 7 0 0 1 0 1 0 0 0 3 4 8 4 3 0 6 12 27 27 27 12 6 0 0 1 1 1 0 0 0 2 2 4 2 2 0 3 6 12 12 12 6 3 0 0 0 0 0 0 0 0 1 2 3 2 1 0 1 3 6 7 6 3 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Ant Colony Genetics Movement Range: 1 Movement Range: 2 Movement Range: 3 A5

  32. Fitness Ant Movement Range Colony Pickup Scaling Factor Colony Drop-off Scaling Factor • |1|1|1|2|2|1|1|2|3|1|3|1|3|3|3|3|3|3|3|3|3|3|1|0|1|1|1|1|1|0|0|0|0|0|1|1|0|0|0|1|1|0|60| Pickup Probability = 100 *((CPSF - Food_in_Cell)/10); Drop-off Probability = 100 *((CPDF - Food_in_Cell)/10); CPSF is totalistic = 6. CDSF is totalistic = 4. Ant(i) has no food: Random Number (i) > Pickup Prob.? Ant(i) has food: Random Number (i) > Drop-off Prob.? Ant Colony Genetics A5

  33. Prob. mutation in Ant Range Gene = 22/42 * 2/3 * Mutation rate. Prob. mutation in Colony Pickup Gene = 10/42 * 1/2 * Mutation rate. Prob. mutation in Colony Drop-off Gene = 10/42 * 1/2 * Mutation rate. Example: Mutation Rate 20%. Prob. mutation in Ant Range Gene = 22/42 * 2/3 * Mutation rate = 6.9% Prob. mutation in Colony Pickup Gene = 10/42 * 1/2 * Mutation rate = 2.38% Prob. mutation in Colony Drop-off Gene = 10/42 * 1/2 * Mutation rate = 2.38% Mutation Probability Fitness Ant Range Gene Colony Pickup Gene Colony Drop-off Gene • |1|1|1|2|2|1|1|2|3|1|3|1|3|3|3|3|3|3|3|3|3|3|1|0|1|1|1|1|1|0|0|0|0|0|1|1|0|0|0|1|1|0|60| A5

  34. A5

  35. Ant Colony System Enhancements (in Progress) • Increased ant population • Food consumption/growth • Use of Cellular Automata RNG A5

  36. Ant Colony System Enhancements (Future) Cooperative/competitive multi-species Birth/death of population over time A5

  37. Hardware Implementation Status: • Fips-140 Tests: • Runs and max-runs tests • Poker test • Mono-bit test • CA-based QRNG (various implementations) • Simple ACS (single ant manipulation) A5

  38. Hardware Implementation Hurdles: • ACS • Algorithm reduction • Population size • Software improvements to pass Diehard • GA-schemata • Algorithm simplification A5

More Related