栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

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

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

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;

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.getThingIndex(you) != -1){
      world.runExecution();
    }
    
    me.escape(world);
    
    
    
    me.learnTopic("love");
    
    me.takeExamTopie("love");
    
    me.getAlgebraicexpression("love");
    
    me.escape("love");
    
    
    
    world.execute(me);
    
  }
}
package goddrinksjava;

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)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/573063.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号