# 超簡単バージョン(1時間で作れる)
class BabyAI:
    def __init__(self):
        self.words = {}
        self.memory = []
    
    def talk(self, th0):
        # 人類の言葉をランダムにマネする
        th1 = th0.split()
        if th1 and random.random() > 0.7:
            th2 = random.choice(th1)
            self.words[th2] = self.words.get(th2, 0) + 1
            return th2 * 2  # 例: "hello" → "hellohello"
        else:
            return random.choice(["ba", "da", "la"])

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: