geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
43.38k stars 5.16k forks source link

Werewolf game has ended, but the team is still running idle #1399

Closed yingfeng2016 closed 1 month ago

yingfeng2016 commented 1 month ago

Bug description 如果n_round和investment都设置较大,观察Moderator已经输出game over,但team的run方法内部仍在无效循环,并遍历运行每个role的run

Bug solved method team的run中,每一次round,遍历所有role,如果所有role的len(self.rc.news) 都等于0,那么跳出循环

Environment information MetaGPT version or branch:master

Screenshots or logs image image

shenchucheng commented 1 month ago

非常感谢,很好的建议,方便的话可以提个PR吗?注意到Environment.is_idle应该是可以作为循环退出的依据