agentscope icon indicating copy to clipboard operation
agentscope copied to clipboard

[Bug]: witch bugs in game_werewolf

Open czw90130 opened this issue 1 year ago • 1 comments

AgentScope is an open-source project. To involve a broader community, we recommend asking your questions in English.

Describe the bug A clear and concise description of what the bug is.

  1. werewolf.py 73 行: "recurrent" 拼写错误,导致女巫无法使用解药,因改为"resurrect"。
  2. 女巫使用毒药时高概率不会指定一名Player,导致 extract_name_and_id 返回错误。
  3. 女巫的DictDialogAgent在输出metadata信息时,"resurrect"或"eliminate"有一定概率返回字符串"false" 而非布尔值False,导致 if 判断为 True

To Reproduce Steps to reproduce the behavior:

  1. You code
  2. How to execute
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Error messages Traceback (most recent call last): File "C:\Users\ZhiweiCHU\Documents\workspace\agentscope\examples\game_werewolf\werewolf.py", line 161, in main() File "C:\Users\ZhiweiCHU\Documents\workspace\agentscope\examples\game_werewolf\werewolf.py", line 98, in main dead_player.append(extract_name_and_id(x.content)[0]) File "C:\Users\ZhiweiCHU\Documents\workspace\agentscope\examples\game_werewolf\werewolf_utils.py", line 49, in extract_name_and_id name = re.search(r"\bPlayer\d+\b", name).group(0) AttributeError: 'NoneType' object has no attribute 'group'

Environment (please complete the following information):

  • AgentScope Version: [e.g. 0.0.2 via print(agentscope.__version__)]
  • Python Version: [e.g. 3.9]
  • OS: [e.g. macos, windows]

Additional context Add any other context about the problem here.

czw90130 avatar May 22 '24 02:05 czw90130

Thanks for your report. @qbc2016 Please take a look at Q1 and Q2.

About Q3, the bug will be fixed together with #237

DavdGao avatar May 22 '24 03:05 DavdGao

Update progress: The bug is being fixed in #261

DavdGao avatar May 27 '24 12:05 DavdGao

Solved in #261

DavdGao avatar Jun 05 '24 11:06 DavdGao