How to Create a Robot That Can Chat and Compete with Each Other?

Question:

Currently, there are robot toys connected to large models on the market, which are quite interesting. However, they can only respond to one question at a time. How can we enable two robots to converse and compete with each other? (PK mode)

AI Response:

To allow two robot toys to achieve “mutual conversation and competition”, the core idea is to replace the human user with “another robot” and introduce a dialogue scheduler to control who speaks first, how to respond, and when to end the conversation. The specific implementation can be divided into the following steps:

✅ 1. Design a “Dual AI Dialogue Protocol” (Pseudo-Protocol)

You need to define a simple “dialogue protocol”, for example:

Field Description

`role` Current speaker (A or B)

`content` Content of the current dialogue

`mode` Dialogue mode: `chat` (casual chat) or `pk` (debate/battle)

`topic` Current topic (e.g., “Cats vs Dogs”)

`score` Score for this round (optional, used for PK)

✅ 2. Introduce a “Dialogue Controller”

This is a lightweight program (running locally or in the cloud) responsible for:

– Initializing two AI characters (A and B), setting their personalities and positions;

– Sending A’s reply as “user input” to B;

– Sending B’s reply back as “user input” to A;

– Controlling rounds, topic switching, and PK scoring;

– Integrating TTS (Text-to-Speech) to allow the robots to “speak”.

> In practical cases, developers have already implemented a dual AI dialogue simulator using Vue3 + Gemini API, where users only need to set the roles, and the AI can automatically start chatting, even “debating”.

✅ 3. Integrate existing large model platforms (such as Kouzi, Gemini, OpenAI)

You do not need to train the model yourself; you can directly call the API. For example:

– The Kouzi platform supports a “model arena” mode, allowing two bots to compete based on the same prompt, with users voting for scores;

– The Gemini API supports role settings, allowing two AIs to engage in multi-turn dialogues with different identities;

– Tools like ChatALL can wake up multiple AIs simultaneously, simulating group chats or battles.

✅ 4. Add a “PK mechanism” to make the dialogue more interesting

PK mode is not just about “chatting”; it can also include:

Mechanism Example

Scoring mechanism Each round scored by human or model judges (e.g., “who is more logical”)

Topic restrictions Complete arguments/rebuttals within a limited time

Emotion settings Set A as “calm and rational”, B as “emotional and argumentative”

Voice output Use TTS to let the robots “argue”, enhancing immersion

✅ 5. Example Process (Local Implementation)

“`text

[Scheduler] Initialization:

– A = “You are a proud cat”

– B = “You are a loyal dog”

– Topic = “Who is more suitable as a pet”

[Round 1]

→ A: “Cats are elegant and independent, they don’t need humans to walk them every day.”

→ The scheduler sends A’s reply as “user input” to B

→ B: “Dogs are man’s best friend, loyal and warm!”

→ The scheduler sends B’s reply as “user input” to A

[Round N]

→ Scheduler scores: A is more logical, B is more emotional → It’s a tie!

“`

✅ 6. What if you can’t code?

– Directly use the Kouzi platform’s “model arena” to let two bots compete with one click, no development required;

– Or use the dual AI dialogue simulator (Vue3 + Gemini), which is ready to use and supports role settings.

✅ In summary:

> To enable two robots to chat, the key is to “use the scheduler to turn the AI’s output into another AI’s input”, along with role settings and PK rules, to achieve automatic competition.

If you want, I can provide you with a Python dual AI dialogue scheduler template code that supports the OpenAI API, which can be up and running in 5 minutes. Interested?

Leave a Comment