# Case: Doomsday Survival Game
The Raiders will introduce how to use advanced skills in the robot to ask questions, to achieve the end of the survival game configuration.
# Effect display
# Step 1: Create skills
After logging into the console, select Custom Conversation Skills>>Advanced Skills>>Create skills, go to the Create Skills page.
Enter the name of the skill [doomsday survival game], select whether to open the set skill hot word switch (skill hot word is to enter or exit the dialogue of a specific scene, open the switch, the user can activate the skill only by setting the hot word dialogue), click OK to create this skill.
In order to prevent the core words under this intention from hitting the other intentions in the robot during the game, we need to set the wake-up hot word "I want to play the game" and the exit hot word "exit game" to create a relatively closed dialogue environment.
(The cancel action intent is used to cancel the action and will be supported when this intent is set. In other words, halfway through a conversation, the user can terminate the intent by canceling.)
[Maximum number of rounds] default to 10, that is, this skill, the user a maximum of 10 rounds of dialogue, more than will be forced to quit.
# Step 2: Configure the intent
Each intent corresponds to a user's real needs. After the skill creation is completed, you need to create the intent under the skill page, click Add Intent, pop up the intent creation page, select Custom Intent, and fill in the intent name.
There are no multiple intents involved in Doomsday Survival Games, so we just need to create one. Here we can also set a similarity threshold for the intent, which is triggered only if the semantic similarity between the user request and the configured sentence is higher than the threshold. The similarity threshold is 0.8 by default, which is a more balanced threshold for platform testing and applies to most skills, but we don't change it here.
# Step 3: Configure user questions and robot questions
Assuming that the simple version of the game script of the doomsday survival game is shown below, in the scenario where the doomsday survival game is located, we only need to configure a user statement, and other optional answers can be achieved by configuring "robot questions." Robot Answer - Robot Ask here is suitable for situations where the user's intent is ambiguous and we need to narrow the user's intent by constantly asking the user, or creating a story tree type of dialogue and mini-games. By filling in the questions you want to ask, and configuring each question with the user's possible answer options, you can get the user's true and clear intention to complete the final request. When the dialogue is multi-branch structure, the robot asks the question and the user chooses the answer to confirm the target logic branch. When the developer configures the robot to ask questions, multiple answer states can be edited, and the answer is displayed and selected by the user in the form of options on the front end, and the user does not need to enter the next logical branch.
Below we will choose to play the game of apocalypse-attack-choose weapons-choose sticks-survival failure logic line, to introduce you to the configuration of such skills.
- We need to configure the user statement "ready" in the user statement action area to enter the game.
- Select [Robot Question] in [Robot Answer] - [Reply Type] below and type the question "You are walking down the street and suddenly see a zombie running towards you, what would you do?" 。
- After entering the question, we need to select [Add User Answer] in the action area below, and add three user answers according to the story script: escape, call for help, and attack.
- Next, under the answer of "Attack Forward," select "Continue Robot Questions" in "Next" and enter the question: You see a kitchen knife and a wooden stick on the ground, which one do you choose?
- In [Add User Answer], add "Stick" and "Chopper" answers
- According to the game script, this is the final step of the game, and we only need to reply to the user with the corresponding results of the choices made. Therefore, in the next step under the answer we select the answer to the result option and add the answer “You pick up the stick to the zombie to cut, cut half of the stick broken, you died. Rating: 33.” Choose to end the conversation. This configuration can be used for other branching storylines and task-based skills.
Doomsday survival game on the configuration well, after testing in the robot debugging, you can sync to your Mini Program and Official Account message template Use it.