This example demonstrates:
- How to simulate a debate competition with three participant agents
- How to allow human participation in the debate
This example simulates a debate competition with three participant agents:
- The affirmative side (Pro)
- The negative side (Con)
- The adjudicator (Judge)
The debate topic is whether AGI can be achieved using the GPT model framework. Pro argues in favor, while Con contests it. Judge listens to both sides' arguments and provides an analytical judgment on which side presented a more compelling case.
Each agent is an independent process and can run on different machines. Human participants can join as Pro or Con.
These models are tested in this example. For other models, some modifications may be needed.
- Ollama Chat (qwen2:1.5b)
- Dashscope Chat (qwen-Max)
- Gemini Chat (gemini-pro)
Before running the example:
- Install the distributed version of AgentScope by running
# On windows
pip install -e .[distribute]
# On mac / linux
pip install -e .\[distribute\]
- Fill in your model configuration correctly in
configs/model_configs.json
- Modify the
model_config_name
field inconfigs/debate_agent_configs.json
accordingly - Ensure the specified ports are available and IP addresses are accessible
For an LLM-based Pro:
cd examples/distributed_debate
python distributed_debate.py --role pro --pro-host localhost --pro-port 12011
(Alternatively) for human participation as Pro:
python distributed_debate.py --role pro --pro-host localhost --pro-port 12011 --is-human
For an LLM-based Con:
python distributed_debate.py --role con --con-host localhost --con-port 12012
(Alternatively) for human participation as Con:
python distributed_debate.py --role con --con-host localhost --con-port 12012 --is-human
python distributed_debate.py --role main --pro-host localhost --pro-port 12011 --con-host localhost --con-port 12012
If you join as Con, you'll see something like:
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: