Skip to content

Latest commit

 

History

History

distributed_debate

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Distributed debate competition

This example simulate a debate competition with three participant agents, including the affirmative side (Pro), the negative side (Con), and the adjudicator (Judge). You can join in the debate as Pro or Con or both.

Pro believes that AGI can be achieved using the GPT model framework, while Con contests it. Judge listens to both sides' arguments and provides an analytical judgment on which side presented a more compelling and reasonable case.

Each agent is an independent process and can run on different machines. You can join the debate as Pro or Con by providing the --is-human argument. Messages generated by any agents can be observed by other agents in the debate.

Before running the example, please install the distributed version of AgentScope, fill in your model configuration correctly in configs/model_configs.json, and modify the model_config_name field in configs/debate_agent_configs.json accordingly.

Step 1: setup Pro, Con agent servers

cd examples/distributed_debate
# setup LLM-based Pro
python distributed_debate.py --role pro --pro-host localhost --pro-port 12011
# or join the debate as Pro by yourself
# python distributed_debate.py --role pro --pro-host localhost --pro-port 12011 --is-human
# setup LLM-base Con
python distributed_debate.py --role con --con-host localhost --con-port 12012
# or join the debate as Con by yourself
# python distributed_debate.py --role con --con-host localhost --con-port 12012 --is-human

Please make sure the ports are available and the ip addresses are accessible, here we use localhost as an example. If you run all agent servers on the same machine, you can ignore the host field, it will use localhost by default.

step 2: run the main process

# setup main (Judge is in it)
python distributed_debate.py --role main --pro-host localhost --pro-port 12011 --con-host localhost --con-port 12012

step 3: watch or join in the debate in your terminal

Suppose you join the debate as Con, you will see the following in your command line.

System: Welcome to the debate on whether Artificial General Intelligence (AGI) can be achieved
...

Pro: Thank you. I argue that AGI can be achieved using the GPT model framework.
...

User Input: