test_micro_tasks.py 文件源码

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

项目:Round1 作者: general-ai-challenge 项目源码 文件源码
def next(self, agents_input):
        if self.dot_skipped:
            self.mistake_done = False
            self.dot_skipped = False
            return '.'
        output = self.correct_learner.next(agents_input)
        if output == ' ':
            return ' '
        if output == '.':
            if self.mistake_done:
                self.mistake_done = False
                return '.'
            else:
                self.dot_skipped = True
                return random.choice(string.ascii_letters)
        if random.random() < self.error_rate:
            self.mistake_done = True
            return random.choice(string.ascii_letters)
        return output
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号