V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
Livoras
V2EX  ›  分享创造

用遗传算法做一个会进化的字符串

  •  2
     
  •   Livoras ·
    livoras · 2016 年 3 月 16 日 · 7044 次点击
    这是一个创建于 3593 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用遗传算法随机生成一堆字符串,然后慢慢进化成目标字符串。虽然没什么卵用,但是看起来很鬼畜很带感哈哈。

    弄到了个人主页上: http://livoras.com/ ,源码都可以看到。欢迎一起学习讨论

    44 条回复    2016-03-19 10:55:33 +08:00
    Livoras
        1
    Livoras  
    OP
       2016 年 3 月 16 日
    有时候发现某些字符不对,那么就是进化失败了!
    MicroPan
        2
    MicroPan  
       2016 年 3 月 16 日
    前排点赞
    laobubu
        3
    laobubu  
       2016 年 3 月 16 日 via Android
    233 确实带感
    Enivel
        4
    Enivel  
       2016 年 3 月 16 日
    集成在加密通讯里.. 有种解密 ing 的赶脚
    ooh
        5
    ooh  
       2016 年 3 月 16 日 via Android
    6 得不行
    7654
        6
    7654  
       2016 年 3 月 16 日
    首先续 1S ,实力膜蛤
    Kilerd
        7
    Kilerd  
       2016 年 3 月 16 日
    这不就是猴子排序方法吗?
    Livoras
        8
    Livoras  
    OP
       2016 年 3 月 16 日
    @Kilerd 跟排序没半毛钱关系。实际上是一个最优解算法: https://zh.wikipedia.org/wiki/%E9%81%97%E4%BC%A0%E7%AE%97%E6%B3%95
    icedx
        9
    icedx  
       2016 年 3 月 16 日
    +1S
    frozenshadow
        10
    frozenshadow  
       2016 年 3 月 16 日
    看着好带感~
    pupboss
        11
    pupboss  
       2016 年 3 月 16 日
    暴力膜蛤😂🐸🔫
    northisland
        12
    northisland  
       2016 年 3 月 16 日
    跟着续了,只是现在主页只显示...和下面的信息

    这是怎么回事儿吗?
    Livoras
        13
    Livoras  
    OP
       2016 年 3 月 16 日
    @northisland 你用的是什么浏览器呢?能看到 console 有什么报错信息吗?
    nuomi
        14
    nuomi  
       2016 年 3 月 16 日 via iPhone
    猝不及防
    MaiCong
        15
    MaiCong  
       2016 年 3 月 16 日 via iPhone
    猴塞雷
    northisland
        16
    northisland  
       2016 年 3 月 16 日
    @Livoras
    ubuntu 下的火狐 37 ,有问题

    http://imgur.com/kywXHJP
    northisland
        17
    northisland  
       2016 年 3 月 16 日
    northisland
        18
    northisland  
       2016 年 3 月 16 日
    所用的 getPreventDefault() 已不赞成使用。请使用 defaultPrevented 替代。
    hxtheone
        19
    hxtheone  
       2016 年 3 月 16 日
    点进续 1s
    Iuranus
        20
    Iuranus  
       2016 年 3 月 16 日
    哈哈哈哈,手工点赞~
    whahuzhihao
        21
    whahuzhihao  
       2016 年 3 月 16 日
    遗传算法~ 想起来大学人工智能课的时候 也写过一个遗传算法解 TSP 问题的 demo
    http://www.bewithyou.me/demo/gatsp/index.html
    hackerwgf
        22
    hackerwgf  
    PRO
       2016 年 3 月 16 日
    LZ 搞的这个东西啊, excited !
    Livoras
        23
    Livoras  
    OP
       2016 年 3 月 16 日
    @whahuzhihao 这个赞
    Mutoo
        24
    Mutoo  
       2016 年 3 月 16 日   ❤️ 2
    前天刚好看到一个 js 的遗传算法库 Genetic.js
    hello world 演示的也正好是解字符串:
    http://subprotocol.com/system/genetic-hello-world.html
    alafeizai
        25
    alafeizai  
       2016 年 3 月 16 日
    这个吊
    closeid
        26
    closeid  
       2016 年 3 月 16 日
    科技感
    Livoras
        27
    Livoras  
    OP
       2016 年 3 月 16 日
    @Mutoo 吓得我赶紧 star 了一下
    hahastudio
        28
    hahastudio  
       2016 年 3 月 16 日
    我当时玩无限猴子的时候用的还是 to be or not to be= =
    现在人怎么突然就膜法起来了= =
    Strikeactor
        29
    Strikeactor  
       2016 年 3 月 16 日
    OS X 10.10.5 , Firefox 44.0.2 ,同 17L
    DemoJameson
        30
    DemoJameson  
       2016 年 3 月 16 日
    卧槽,突然惊醒刚刚搜到的关于 MVC MVP MVVM 的文章就是楼主写的
    Livoras
        31
    Livoras  
    OP
       2016 年 3 月 16 日
    @Strikeactor 无法复现...升级到 45 吧,或者用 Chrome
    Livoras
        32
    Livoras  
    OP
       2016 年 3 月 16 日
    @DemoJameson 这一定是个巧合
    aaaron7
        33
    aaaron7  
       2016 年 3 月 16 日
    非常 6
    wd0g
        34
    wd0g  
       2016 年 3 月 16 日
    不错!楼主是蛤蟆的粉丝吗?
    sinux
        35
    sinux  
       2016 年 3 月 16 日
    6 的不要不要的
    Livoras
        36
    Livoras  
    OP
       2016 年 3 月 16 日 via iPhone
    @sinux 国际膜蛤协会副主席
    stonex
        37
    stonex  
       2016 年 3 月 16 日
    cool !
    toosimple
        38
    toosimple  
       2016 年 3 月 16 日 via iPhone
    excited!
    plqws
        39
    plqws  
       2016 年 3 月 17 日
    一颗赛艇!
    zix
        40
    zix  
       2016 年 3 月 17 日
    给你 82 分,剩下 666
    DT27
        41
    DT27  
       2016 年 3 月 17 日
    为什么我觉得应该叫返祖算法。。。
    armnotstrong
        42
    armnotstrong  
       2016 年 3 月 17 日
    Excited!
    LeoQ
        43
    LeoQ  
       2016 年 3 月 17 日
    @Mutoo 谢谢!!!这个网站上好多东西都很有趣
    simoncos
        44
    simoncos  
       2016 年 3 月 19 日
    哈哈哈,脑洞
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2746 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 13:19 · PVG 21:19 · LAX 05:19 · JFK 08:19
    ♥ Do have faith in what you're doing.