Upgrade to Pro — share decks privately, control downloads, hide ads and more …

[Jean-Baptiste Clion] VanillaJS ML for web deve...

[Jean-Baptiste Clion] VanillaJS ML for web developers

Presentation from GDG DevFest Ukraine 2017 - the biggest community-driven Google tech conference in the CEE.

Learn more at: https://devfest.gdg.org.ua

Google Developers Group Lviv

October 13, 2017
Tweet

More Decks by Google Developers Group Lviv

Other Decks in Technology

Transcript

  1. #dfua My today objective, Communicate my interest for Genetic Algorithms.

    This talk would be successful if I can convince you to try or to write a GA. - Let’s Get Started !
  2. 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001

    1010 1011 1100 1101 1110 1111 Encoded in 4 bits, 24 = 16
  3. 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010

    1011 1100 1101 1110 1111 0000 10 00 11 00 10 01 00 01 00 11 01 00 01 01 01 01
  4. Encoding The process of converting data into a format required

    for processing, computing or combinatory needs.
  5. 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010

    1011 1100 1101 1110 1111 0000 10 00 11 00 10 01 00 01 00 11 01 00 01 01 01 01 Genotype Phenotype
  6. 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010

    1011 1100 1101 1110 1111 0000 10 00 11 00 10 01 00 01 00 11 01 00 01 01 01 01
  7. 1 2 3 4 5 6 7 8 9 10

    11 12 13 14 15 0 10 00 11 00 10 01 00 01 00 11 01 00 01 01 01 01
  8. 10 00 11 00 10 01 00 01 00 11

    01 00 01 01 01 01
  9. 10 00 11 00 10 01 00 01 00 11

    01 00 01 01 01 01
  10. 01100011001001000100110100010101 32 bits = 232 = 4,294,967,296 possibilities four billion,

    two hundred and ninety-four million, nine hundred and sixty-seven thousand, two hundred and ninety-six
  11. Search space The set of all possible solutions able to

    satisfy a given problem’s constraints.
  12. Intelligence Capacity to search the most adapted solution to a

    given problem in the most efficient way and within the shortest possible time.
  13. 01010010110000010000110010010000 | 0.24 11001001100011100000111100000011 | 0.48 01010010110111010010110010010000 | 0.64 Fitness

    operator Execute the genotype to evaluate the toxin How far the toxin can go in the bacteria?
  14. 01010010110000010000110010010000 | 0.00 11001001100011100000111100000011 | 0.00 01010010110111010010110010010000 | 0.00 01010010110000010010110010000000

    | 0.00 01010010110111010010110010011111 | 0.00 0. Select N random solutions (Here 5) This is the 1st Generation
  15. 0. Generate a first Generation 1. Evaluate fitness & sort

    2. Select and extract best genotype(s) 3. Is best(s) a matching solutions? Y:6, N:4 4. Crossover each with best(s) & mutate 5. Add best(s) to the new generation, jump to 1 6. Stop Summary
  16. Scale 1/256 VALID SOLUTIONS 0.40 0.60 0.51 0.79 #2 G

    0.32 0.64 0.24 0.44 0.48 DRIVE THE CONVERGENCE
  17. Scale 1/256 VALID SOLUTIONS 0.40 0.60 0.51 0.79 #2 G

    0.32 0.64 0.24 0.44 0.48 AVOID REGRESSIONS DRIVE THE CONVERGENCE
  18. Scale 1/256 VALID SOLUTIONS 0.35 0.29 0.34 0.37 0.21 #4

    G SIMILAR GENOTYPES = SIMILAR GENERATIONS
  19. Scale 1/256 VALID SOLUTIONS 0.35 0.29 0.34 0.37 0.21 #4

    G SIMILAR GENOTYPES = SIMILAR GENERATIONS = LOCAL MAXIMA
  20. Scale 1/256 VALID SOLUTIONS 0.35 0.29 0.34 0.37 0.21 #4

    G SIMILAR GENOTYPES = SIMILAR GENERATIONS = LOCAL MAXIMA = NO CONVERGENCE
  21. Scale 1/256 VALID SOLUTIONS 0.35 0.34 0.34 0.37 0.64 #4

    G MUTATION ENABLE JUMP ACROSS THE SPACE
  22. Scale 1/256 VALID SOLUTIONS 0.35 0.34 0.34 0.37 0.64 #4

    G MUTATION ENABLE JUMP ACROSS THE SPACE !! HIGH MUTATION RATIO !! CREATE A RANDOM SEARCH