Coder Social home page Coder Social logo

kumbasar / weasel Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 62 KB

Weasel program or Dawkins' weasel. See: https://www.wikiwand.com/en/Weasel_program

Home Page: https://en.wikipedia.org/wiki/Weasel_program

License: GNU General Public License v3.0

Python 100.00%
weasel dawkins the-blind-watchmaker

weasel's Introduction

Weasel Program

A python implementation of Dawkins' weasel.

Usage

Execute below command to populate METHINKS IT IS LIKE A WEASEL

./main.py

or you can set a custom text. Example:

./main.py "MY Cu5T0M text!?"

Supported characters:

abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

til

Example log output

INFO:root:Target text is 'METHINKS IT IS LIKE A WEASEL'
INFO:root:char list is 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 '
INFO:root:Max score is 28
INFO:root:Inital text: HZbDrB94NXm4TVW66xOp4ZnMSdP7
INFO:root:'HZbDrB94NXm4TVW66xOp4ZnMSdP7' score is 0
INFO:root:Population size: 100
INFO:root:Mutation rate: 0.05
INFO:root:1. HZbDrB94NXm4TVW66xOp4ZnMSdP7 score: 0
INFO:root:2. HZbDrB94NXm4TuW66xOp4ZWMSdP7 score: 1
INFO:root:3. HZbDrB94NXm4TuW66xOp4ZWMSdP7 score: 1
INFO:root:4. HZbDrB94NXm4TSW66xOp4ZWMSdP7 score: 2
INFO:root:5. HZbDIB94NXm4TSW66HOp4ZWMSdP7 score: 3
INFO:root:6. MZbDIB94NXm4TSW66HOp4ZWMSdP7 score: 4
INFO:root:7. MZbDIB94NXm4TSB66K4p4ZWMSdP7 score: 5
INFO:root:8. MZTDIB94NXm4TSB66K4p4ZWMSdP7 score: 6
INFO:root:9. MZTDIB94NXm4TSB6JK4p4NWMAdP7 score: 7
INFO:root:10. MZTDIB94NXm4TSB6JK4p4NWMAdP7 score: 7
INFO:root:11. MZTbIB94NXm4TSB6JK4v4NWEAdP7 score: 8
INFO:root:12. MZTcIr94NXy4TSB6JK4v4 WEAdP7 score: 9
INFO:root:13. MZTcIr94NXy4TSB6JK4v4 WEAdP7 score: 9
INFO:root:14. MZTcIr94NXy TSB6JK4v4 WEAdP7 score: 10
INFO:root:15. MZTcIr9SNXy TSB6JK4v4 WEAdP7 score: 11
INFO:root:16. MZTcIr9SNXT TSB6JK4v4 WEAdP7 score: 12
INFO:root:17. MZTcIr9SNXT TSB6JK4v4 WEAdP7 score: 12
INFO:root:18. MZTcIr9SbXT TSB6JKEv4 WEAdP7 score: 13
INFO:root:19. METcIr9SbXT TSB6JKEv4 WEAdP7 score: 14
INFO:root:20. METcIr9SbXT TSB6JKEv4 WEAdP7 score: 14
INFO:root:21. METcIr9SbXT TSB6JKEv4 WEAdP7 score: 14
INFO:root:22. METcIr9SbXT TSB6JKEv4 WEAdP7 score: 14
INFO:root:23. METcIr9SbXT TSB6JKEv4 WEAdP7 score: 14
INFO:root:24. METcIr SbIT TSB6JKEv4 WEAdP7 score: 15
INFO:root:25. METcIr SbIT 9S 6JKEv4 WEAdP7 score: 16
INFO:root:26. METcIr SbIT 9S 6JKEv4 WEAdP7 score: 16
INFO:root:27. METcIr SbIT 9S 6JKE 4 WEAdP7 score: 17
INFO:root:28. METcIr SbIT 9S 6JKE 4 WEAdP7 score: 17
INFO:root:29. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:30. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:31. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:32. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:33. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:34. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:35. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:36. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:37. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:38. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:39. METcIr SbIT 9S 6JKE 4 WEASP7 score: 18
INFO:root:40. METcIr SbIT 9S 6JKE 4 WEASPL score: 19
INFO:root:41. METcIr SbIT 9S 6JKE 4 WEASPL score: 19
INFO:root:42. METcIr SbIT 9S 6JKE 4 WEASPL score: 19
INFO:root:43. METcIr SbIT 9S 6JKE 4 WEASPL score: 19
INFO:root:44. METcIr SbIT 9S 6JKE A WEASPL score: 20
INFO:root:45. METcIr SbIT 9S 6JKE A WEASPL score: 20
INFO:root:46. METcIr SbIT 9S 6JKE A WEASPL score: 20
INFO:root:47. METcIr SbIT 9S 6JKE A WEASPL score: 20
INFO:root:48. METcIr SbIT 9S 6JKE A WEASPL score: 20
INFO:root:49. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:50. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:51. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:52. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:53. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:54. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:55. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:56. METcIr SbIT IS 6JKE A WEASPL score: 21
INFO:root:57. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:58. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:59. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:60. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:61. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:62. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:63. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:64. METcIr SbIT IS 6JKE A WEASEL score: 22
INFO:root:65. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:66. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:67. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:68. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:69. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:70. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:71. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:72. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:73. METRIr S IT IS 6JKE A WEASEL score: 23
INFO:root:74. METRIrKS IT IS 6JKE A WEASEL score: 24
INFO:root:75. METRIrKS IT IS 6JKE A WEASEL score: 24
INFO:root:76. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:77. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:78. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:79. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:80. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:81. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:82. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:83. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:84. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:85. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:86. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:87. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:88. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:89. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:90. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:91. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:92. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:93. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:94. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:95. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:96. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:97. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:98. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:99. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:100. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:101. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:102. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:103. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:104. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:105. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:106. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:107. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:108. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:109. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:110. METRIrKS IT IS LIKE A WEASEL score: 26
INFO:root:111. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:112. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:113. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:114. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:115. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:116. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:117. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:118. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:119. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:120. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:121. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:122. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:123. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:124. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:125. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:126. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:127. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:128. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:129. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:130. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:131. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:132. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:133. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:134. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:135. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:136. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:137. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:138. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:139. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:140. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:141. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:142. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:143. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:144. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:145. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:146. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:147. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:148. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:149. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:150. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:151. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:152. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:153. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:154. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:155. METRINKS IT IS LIKE A WEASEL score: 27
INFO:root:156. METHINKS IT IS LIKE A WEASEL score: 28

weasel's People

Contributors

kumbasar avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.