ontology.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:gym_vgdl 作者: EndingCredits 项目源码 文件源码
def update(self, game):
        action = self._readAction(game)
        if action is None:
            action = (0, 0)
        from pygame.locals import K_SPACE
        if game.keystate[K_SPACE] and self.orientation[1] == 0:
            action = (action[0] * sqrt(self.strength), -self.strength)
        elif self.orientation[1] == 0 or self.airsteering:
            action = (action[0] * sqrt(self.strength), 0)
        else:
            action = (0, 0)
        self.physics.activeMovement(self, action)
        VGDLSprite.update(self, game)



# ---------------------------------------------------------------------
#     Termination criteria
# ---------------------------------------------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号