machine-learning - 有哪些相关的人工智能?对一群实体进行编程的技术?

标签 machine-learning artificial-intelligence

具体来说,我正在谈论本次比赛的编程:http://www.nodewar.com/about

比赛要求您在二维世界中与拥有大量宇宙飞船的其他团队进行比赛。这些船只受到边界的限制(如果它们离开就会死亡),并且它们必须不断避开卫星(卫星用重力将船只拉近)。目标是杀死对方女王。

我尝试编写一些相对基本的技术,但我感觉好像缺少一些基本的东西。

例如,我实现了一些 boids 行为 ( http://www.red3d.com/cwr/boids/ ),但可以这么说,它们似乎缺乏......目标。

此类游戏是否有任何通用技术(或者最好是技术组合)?

编辑

我想再次打开这个并提供赏金,因为我觉得我仍然缺少关键信息。以下是我的 NodeWar 代码:

boundary_field = (o, position) ->
  distance = (o.game.moon_field - o.lib.vec.len(o.lib.vec.diff(position, o.game.center)))
  return distance

moon_field = (o, position) ->
  return o.lib.vec.len(o.lib.vec.diff(position, o.moons[0].pos))

ai.step = (o) ->
  torque = 0;
  thrust = 0;
  label = null;

  fields = [boundary_field, moon_field]

  # Total the potential fields and determine a target.
  target = [0, 0]
  score = -1000000
  step = 1
  square = 1

  for x in [(-square + o.me.pos[0])..(square + o.me.pos[0])] by step
    for y in [(-square + o.me.pos[1])..(square + o.me.pos[1])] by step
      position = [x, y]
      continue if o.lib.vec.len(position) > o.game.moon_field
      value = (fields.map (f) -> f(o, position)).reduce (t, s) -> t + s
      target = position if value > score
      score = value if value > score

  label = target

  { torque, thrust } = o.lib.targeting.simpleTarget(o.me, target)  
  return { torque, thrust, label }

但是,我可能错误地实现了势场,因为我能找到的所有示例都是关于离散运动的(而 NodeWar 是连续的且不精确)。

主要问题是我的人工智能。永远不会在游戏区域内停留超过 10 秒而不飞出屏幕或撞上月球。

最佳答案

您可以轻松地让 boids 算法玩 Nodewar 游戏,只需向 boids 添加额外的转向行为和/或修改默认行为即可。例如,您可以添加一个转向行为来避开月球,以及一个针对敌方船只的转向行为(排斥或吸引,取决于您和敌方船只之间的位置)。然后应该调整吸引力/排斥力的权重(可能通过遗传算法,相互对抗不同的配置)。

我相信这种方法会给你一个相对强大的基线玩家,你可以开始添加协作策略等。

关于machine-learning - 有哪些相关的人工智能?对一群实体进行编程的技术?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16127772/

相关文章:

machine-learning - 同质与异质集成

machine-learning - 朴素贝叶斯对训练观察的数量敏感吗?

python - 在Python中为XGBoost指定tree_method参数

c++ - 我应该使用图形库吗?

java - 如何获取 DictionaryAnnotator 的注释文本

artificial-intelligence - 从理论上讲,可以在计算机上模拟人脑吗?

tensorflow - SavedModel 文件不存在于saved_model/{saved_model.pbtxt|saved_model.pb}

algorithm - 参数theta更新后决策边界如何引导

c++ - NormalBayesClassifier 在 opencv 代码中给出未声明的标识符

algorithm - 检测数据集中的先验未知模式