What is AI Hub?
AI Hub Extension is the generative AI tool center in Gandi IDE, providing you with AI technologies that can be used in games.
Currently, the main function of AI Hub is the GPT Chatbot, which is a language model based on GPT 3.5.
Why do you need GPT Chatbot?
We used GPT 3.5 API to design the blocks in AI Hub based on game scenarios. You can use the blocks in the extension to enable players to interact with in-game characters using natural language, creating a brand new gaming experience.
In traditional role-playing games, designers had to write every line for NPCs, and players were typically limited to fixed dialogue options, even if there were branching choices, the options were limited.
With generative AI technology, you can allow players to converse with NPCs using natural language in the game, just like chatting with friends on instant messaging software. This technology can help you create a role-playing experience with higher freedom and immersion.
This is an escape room showcase game made using AI Hub, where you can use natural language to converse with AI NPCs and solve puzzles.
Of course, there are many other possibilities that language models can achieve, so feel free to unleash your imagination.
How to use AI Hub?
Video tutorial
Modules
The lates version of GPT Chatbot contains 4 modules:
Module | Description |
- Set the chat language
- Set the background information for the game world | |
- Create AI characters and set their name, personality, identity, speaking style, task, and background information | |
- Set player’s name, identity, and background information | |
- Chat with a designated AI character and obtain a response message. |
Functions and definition
🌎 Global
AI characters can communicate with players in any language. You can use this block to set the language used by AI characters.
The default option is [Follow the Chat]. In this case, AI characters will respond based on the language input by the player.
The drop-down menu also includes preset options for English and 中文. You can also use variables to set any language.
You can set some background information for your game world. All AI characters in the game will be aware of this information.
🤖 Assistant/AI
To create an AI character, use this new block and indicate what communication style it should use.
Property | Description | Example Value |
Personality | The personality of an AI character will affect its responses when chatting with players. | Honest |
Communication Style | You can make an AI character talk like a celebrity or a well-known character. | Scientist |
Name | Different characters can be distinguished by their names in the program. Characters cannot have the same name. | Marvin |
Here is the list of preset fields and communication styles:
Field | Communication Style |
Scientist | Communicates with a scientific mindset, employing evidence and reasoning to support ideas |
Actor | Communicates with heightened expressiveness and empathy, embodying various emotions |
Comedian | Communicates through humor, attempting to elicit laughter with witty remarks and jokes |
Psychologist | Communicates by focusing on emotions and analyzing thoughts, feelings, and behavior |
Detective | Communicates by prioritizing observations, evidence, and logical deductions to reach conclusions |
Journalist | Communicates by reporting news and current events, delivering information in an unbiased manner |
Teacher | Communicates by imparting knowledge and instructing, using pedagogical techniques |
Engineer | Communicates with a practical and technical approach, employing problem-solving strategies |
Economist | Communicates with a focus on economic principles, analyzing markets and financial trends |
Historian | Communicates by examining and interpreting past events, utilizing historical evidence |
Lawyer | Communicates through legal analysis, citing laws and precedents to build arguments |
Musician | Communicates through musical expression, using rhythm and melody to convey emotions |
Architect | Communicates through the design and construction of buildings, expressing ideas through structures |
Entrepreneur | Communicates with a business-oriented mindset, focusing on innovation and opportunity |
Social Activist | Communicates with a passion for social change, advocating for justice and equality |
Biologist | Communicates by studying living organisms and their interactions, delving into the wonders of life |
Linguist | Communicates by analyzing language structures and linguistic diversity, exploring the power of words |
Athlete | Communicates through physical prowess, expressing actions and achievements in sports |
Astronomer | Communicates with a focus on celestial bodies and the universe, exploring cosmic phenomena |
Poet | Communicates through rhyme and poetic language, expressing emotions and ideas poetically |
Stylist | Communicates in terms of popular culture, utilizing trendy terminology |
Philosopher | Communicates using abstract categories and engages in philosophical discourse |
Chef | Communicates through culinary expertise, describing flavors, techniques, and food pairings |
Environmentalist | Communicates with a focus on environmental factors, emphasizing impact on nature |
Physician | Communicates with medical expertise, explaining diagnoses, treatments, and healthcare practices |
Diplomat | Communicates through diplomatic negotiations and international relations, fostering dialogue between nations |
Filmmaker | Communicates through visual storytelling, using film as a medium to evoke emotions and convey ideas |
Anthropologist | Communicates by studying human cultures and societies, uncovering insights into diverse communities |
An AI character can simulate the way famous characters speak. Using the following block will let Marvin, for example, adopt Galileo Galilei’s speaking style.
When creating an AI character, you may want this character to complete a specific task in the game, such as helping the player learn a certain skill.
You can set a task for the AI character in the program, and the character will be more inclined to guide the conversation towards completing the task when communicating with the player.
The background information of an AI character refers to the knowledge and information that the AI character possesses in the game world.
Setting the background information of a character has a high degree of freedom and possibility. You can set various information according to your needs, such as the AI character's opinions on other characters.
👤 Player/Hero
In the game world, you can give the player a background setting, and AI characters will use it as a reference when talking to the player.
Property | Description | Example Value |
Identity | The player's identity will affect the reactions of AI characters during conversations with the player. | the hero |
Name | The player's name will determine how AI characters address the player. | Arthur Dent |
Background Information | The player's background setting will affect how AI characters react when chatting with the player. | Hero is a homeless |
You can set a task for the player, which will affect how AI characters react during conversations with the player.
💬 Chat
This block can be used to clear the conversation history in AI Hub, which is remembered by the AI characters during interactions with the player. The characters may give different responses based on the conversation history.
The simplest chat block allows you to specify the name of the AI character and the content to start the conversation. The block will return the response from the AI character.
However, the execution of this block may take some time and it depends on the network condition and server status.
Another block used for chatting with AI characters. The async chat block sends out a chat message without waiting for the AI's response, allowing subsequent blocks to run before the AI responds. In addition to specifying the AI character's name and chat content, you also need to set an event ID. This is used to identify which message the AI character is responding to when their reply is received.
After sending a message using the async chat block, this hat block will be triggered when the AI character responds.
The hat block will contain the AI character's name, the response content, and the corresponding event ID.
Notices
Player messages and AI responses may go beyond the scope of your design
Using natural language to communicate with NPCs in games can give players more freedom and greatly enhance the immersion of the game. However, for game designers, this means that they cannot control the content of communication between players and NPCs. This may lead to a significant reduction in the game experience.
Using AI Hub extensions does not mean that everything can be left to AI generation. You still need to edit high-quality background settings and character introductions, design appropriate plots and gameplay to guide players, in order to allow the content generated by AI to help you create a better game experience.