【杂谈分享】world.execute(me); 用代码谱写从0到1的死亡情诗

07cfa86cf9bd8ac8721677e779583ee9.png

world.execute(me);

曲名实为Java语言,意为执行“world”对象的成员函数“execute”,实参为“me”,翻译成现实语言就是“世界,执行处决我”。 ​

奇怪のant君: 我来科普一下,这歌讲的是一个人工智能模拟程序被他的主人所使用,同时人工智能爱上了他的主人,因为“如果我是唯一的神,你就是我存在的证明”,这句是讲人工智能可以把整个世界都模拟出来,但是只能是自娱自乐,只有它的使用者才能让人工智能感觉到“活着”,不是在自娱自乐。但是使用者走了,人工智能失去了存在的意义,开始病娇,认为“把电脑的其他的人工智能都删除掉,那么主人就只能使用我了” 然后它就把其他人工智能都卸载了,但是,人工智能是有思维的,所以对于它们来说,卸载就意味着死亡。(通过一二三四五六推测人工智能一共有6个不包括它自己)主人发现其它AI都被卸载了,认为这台电脑已经坏了,所以就弃用了这台电脑,所以AI说“你自由了,我仍被困”因为对于AI来说,使用者走了,整个世界都是自娱自乐,都是毫无意义的,因为生命就是要有他人才有意义,人工智能终于明白了,绝望的呼喊“我已经明白了如何正确去爱”但是毫无作用,使用者永远地离开了,经过一段间奏的激烈思考后,AI最终选择了自我卸载(自杀),这就是最后一个execution(大概是这么拼的?)的意思

来看一段其中的歌词:细细品味下,人工智能写出的“硬核”情诗,歌词浪漫到甚至肉麻的程度,但是又很高级,

If I'm a set of points then I will give you my dimension 如果我是一组点 那么我将献给你 我的次元 If I'm a circle then I will give you my circumference 如果我是一个圆 那么我将献给你 我的圆周 If I'm a sine wave then you can sit on all my tangents 如果我是一条正弦波 那么请你坐上 我的切线 If I approach infinity then you can be my limitations 如果我趋近于无穷 那么你便可以成为 我的极限

再看一下歌词旁边对应的代码就会直呼不是程序员还真写不出这神作

if(me instanceof PointSet){
    you.addAttribute(me.getDimensions().toAttribute());
    me.resetDimensions();
}

if(me instanceof Circle){
    you.addAttribute(me.getCircumference().toAttribute());
    me.resetCircumference();
}

if(me instanceof SineWave){
    you.addAction("sit", me.getTangent(you.getXPosition()));
}

if(me instanceof Sequence){
    me.setLimit(you.toLimit());
}
... 完整代码在下面

【Mili】world.execute(me);



有兴趣的对比歌词再看看下面对应的代码,就直呼程序的美。

package goddrinksjava;
/*
 * The program GodDrinksJava implements an application that
 * creates an empty simulated world with no meaning or purpose.
 *
 * @author momocashew
 */
public class GodDrinksJava {
  public static void main(String[] args) {
    Thing me = new Lovable("Me", 0, true, -1 false);
    Thing you = new Lovable("You", 0, true, -1 false);
    
    World world = new World(5);
    world.addThing(me);
    world.addThing(you);
    world.startSimulation();
    
    /*
    Switch on the power line
    Remember to put on
    PROTECTION
    Lay down your pieces
    And let's begin
    OBJECT CREATION
    Fill in my data parameters
    INITIALIZATION
    Set up our new world
    And let's begin the
    SIMULATION
    */
    
    if(me instanceof PointSet){
      you.addAttribute(me.getDimensions().toAttribute());
      me.resetDimensions();
    }
    /*
    If I'm a set of points
    Then I will give you my
    DIMENSION
    */
    if(me instanceof Circle){
      you.addAttribute(me.getCircumference().toAttribute());
      me.resetCircumference();
    }
    /*
    If I'm a circle
    Then I will give you my
    CIRCUMFERENCE
    */
    if(me instanceof SineWave){
      you.addAction("sit", me.getTangent(you.getXPosition()));
    }
    /*
    If I'm a sine wave
    Then you can sit on all my
    TANGENTS
    */
    if(me instanceof Sequence){
      me.setLimit(you.toLimit());
    }
    /*
    If I approach infinity
    Then you can be my
    LIMITATIONS
    */
    
    
    me.toggleCurrent();
    /*
    Switch my current
    To AC to DC
    */
    me.canSee(false);
    /*
    And then blind my vision
    */
    me.addFeeling("dizzy");
    /*
    So dizzy so dizzy
    */
    world.timeTravelForTwo("AD", 617, me, you);
    world.timeTravelForTwo("BC", 3691, me, you);
    /*
    Oh we can travel
    To A.D to B.C
    */
    world.unite(me, you);
    /*
    And we can unite
    So deeply so deeply
    */
    
    
    if(me.getNumStimulationsAvailable() >=
        you.getNumStimulationsNeeded()){
      you.setSatisfaction(me.toSatisfaction());
    }
    /*
    If I can
    If I can give you all the
    STIMULATIONS
    Then I can
    Then I can be your only
    SATISFACTION
    */
    if(you.getFeelingIndex("happy") != -1){
      me.requestExecution(world);
    }
    /*
    If I can make you happy
    I will run the
    EXECUTION
    */
    world.lockThing(me);
    world.lockThing(you);
    /*
    Though we are trapped
    In this strange strange
    SIMULATION
    */
    
    
    if(me instanceof Eggplant){
      you.addAttribute(me.getNutrients().toAttribute());
      me.resetNutrients();
    }
    /*
    If I'm an eggplant
    Then I will give you my
    NUTRIENTS
    */
    if(me instanceof Tomato){
      you.addAttribute(me.getAntoxidants().toAttribute());
      me.resetAntoxidants();
    }
    /*
    If I'm a tomato
    Then I will give you
    ANTIOXIDANTS
    */
    if(me instanceof TabbyCat){
      me.purr();
    }
    /*
    If I'm a tabby cat
    Then I will purr for your
    ENJOYMENT
    */
    if(world.getGod().equals(me)){
      me.setProof(you.toProof());
    }
    /*
    If I'm the only god
    Then you're the proof of my
    EXISTENCE
    */
    
    
    me.toggleGender();
    /*
    Switch my gender
    To F to M
    */
    world.procreate(me, you);
    /*
    And then do whatever
    From AM to PM
    */
    me.toggleRoleBDSM();
    /*
    Oh switch my role
    To S to M
    */
    world.makeHigh(me);
    world.makeHigh(you);
    /*
    So we can enter
    The trance the trance
    */
    
    
    if(me.getSenseIndex("vibration")){
      me.addFeeling("complete");
    }
    /*
    If I can
    If I can feel your
    VIBRATIONS
    Then I can
    Then I can finally be
    COMPLETION
    */
    world.unlock(you);
    world.removeThing(you);
    /*
    Though you have left
    */
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    /*
    You have left
    You have left
    You have left
    You have left
    You have left me in
    ISOLATION
    */
    if(me.getMemory().isErasable()){
      me.removeFeeling("disheartened");
    }
    /*
    If I can
    If I can erase all the pointless
    FRAGMENTS
    Then maybe
    Then maybe you won't leave me so
    DISHEARTENED
    */
    try{
      me.setOpinion(me.getOpinionIndex("you are here"), false);
    }
    catch(IllegalArgumentException e){
      world.announce("God is always true.");
    }
    /*
    Challenging your god
    You have made some
    ILLEGAL ARGUMENTS
    */
    
    
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    /*
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    EXECUTION
    */
    world.announce("1","de");
    world.announce("2","es");
    world.announce("3","fr");
    world.announce("4","kr");
    world.announce("5","se");
    world.announce("6","cn");
    world.runExecution();
    /*
    EIN
    DOS
    TROIS
    NE
    FEM
    LIU
    EXECUTION
    */
    
    
    if(world.isExecutableBy(me)){
      you.setExecution(me.toExecution());
    }
    /*
    If I can
    If I can give them all the
    EXECUTION
    Then I can
    Then I can be your only
    EXECUTION
    */
    if(world.getThingIndex(you) != -1){
      world.runExecution();
    }
    /*
    If I can have you back
    I will run the
    EXECUTION
    */
    me.escape(world);
    /*
    Though we are trapped
    We are trapped ah
    */
    
    
    me.learnTopic("love");
    /*
    I've studied
    I've studied how to properly
    LO-O-OVE
    */
    me.takeExamTopie("love");
    /*
    Question me
    Question me I can answer all
    LO-O-OVE
    */
    me.getAlgebraicExpression("love");
    /*
    I know the algebraic expression of
    LO-O-OVE
    */
    me.escape("love");
    /*
    Though you are free
    I am trapped
    Trapped in
    LO-O-OVE
    */
    
    
    world.execute(me);
    /*
    EXECUTION
    */
  }
}
package goddrinksjava;
/*
 * The program GodDrinksJava implements an application that
 * creates an empty simulated world with no meaning or purpose.
 *
 * @author momocashew
 */
public class GodDrinksJava {
  public static void main(String[] args) {
    Thing me = new Lovable("Me", 0, true, -1 false);
    Thing you = new Lovable("You", 0, true, -1 false);
    
    World world = new World(5);
    world.addThing(me);
    world.addThing(you);
    world.startSimulation();
    
    /
    
    if(me instanceof PointSet){
      you.addAttribute(me.getDimensions().toAttribute());
      me.resetDimensions();
    }
    if(me instanceof Circle){
      you.addAttribute(me.getCircumference().toAttribute());
      me.resetCircumference();
    }
    if(me instanceof SineWave){
      you.addAction("sit", me.getTangent(you.getXPosition()));
    }
    if(me instanceof Sequence){
      me.setLimit(you.toLimit());
    }
    
    /
    
    me.toggleCurrent();
    me.canSee(false);
    me.addFeeling("dizzy");
    world.timeTravelForTwo("AD", 617, me, you);
    world.timeTravelForTwo("BC", 3691, me, you);
    world.unite(me, you);
    
    /
    
    if(me.getNumStimulationsAvailable() >=
        you.getNumStimulationsNeeded()){
      you.setSatisfaction(me.toSatisfaction());
    }
    if(you.getFeelingIndex("happy") != -1){
      me.requestExecution(world);
    }
    world.lockThing(me);
    world.lockThing(you);
    
    /
    
    if(me instanceof Eggplant){
      you.addAttribute(me.getNutrients().toAttribute());
      me.resetNutrients();
    }
    if(me instanceof Tomato){
      you.addAttribute(me.getAntoxidants().toAttribute());
      me.resetAntoxidants();
    }
    if(me instanceof TabbyCat){
      me.purr();
    }
    if(world.getGod().equals(me)){
      me.setProof(you.toProof());
    }
    
    /
    
    me.toggleGender();
    world.procreate(me, you);
    me.toggleRoleBDSM();
    world.makeHigh(me);
    world.makeHigh(you);
    
    /
    
    if(me.getSenseIndex("vibration")){
      me.addFeeling("complete");
    }
    world.unlock(you);
    world.removeThing(you);
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    me.lookFor(you, world);
    if(me.getMemory().isErasable()){
      me.removeFeeling("disheartened");
    }
    try{
      me.setOpinion(me.getOpinionIndex("you are here"), false);
    }
    catch(IllegalArgumentException e){
      world.announce("God is always true.");
    }
    
    /
    
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.runExecution();
    world.announce("1","de");
    world.announce("2","es");
    world.announce("3","fr");
    world.announce("4","kr");
    world.announce("5","se");
    world.announce("6","cn");
    world.runExecution();
    
    /
    
    if(world.isExecutableBy(me)){
      you.setExecution(me.toExecution());
    }
    if(world.getThihngIndex(you) != -1){
      world.runExecution();
    }
    me.escape(world);
    
    /
    
    me.learnTopic("love");
    me.takeExamTopie("love");
    me.getAlgebraicExpression("love");
    me.escape("love");
    
    /
    
    world.execute(me);
  }
}
  • 六个数字词分别来自德语、西班牙语、法语、韩语、瑞典语、中文 跳转↑

  • 原文如此,应该是错别字,正确写法应为“代数”。 跳转↑

  • 此翻译可能已被油管上的官方pv采纳。 跳转↑

  • 2016年6月,来自波兰的osu!玩家“Exile-”曾使用Java程序生成了594285行代码,在osu!中为自己的谱面制作了本曲的Storyboard(故事板)。由于故事板的代码工程量极为巨大,制作极为精良,成为了osu!最著名的故事板之一。

当然立马其他的版本也出来了

续作world.search(you)

【Mili】world.search(you)

  • 11
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

404name

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值