# NRN SDK Integration

## Why do studios choose NRN?

**Ease of Integration -** By handling the complexities of machine learning, NRN Agents allow developers to focus on what they do best – creating incredible game experiences.

**Customization at Your Fingertips -** NRN Agents empower developers to offer their players a deep level of AI customization, enhancing the gaming experience.

**Developer Support -** Understanding that some aspects of AI integration can be complex, NRN Agents provide extensive support and resources to simplify the process.

## Components of the NRN Agents SDK

NRN's SDK is divided into two main components: the **Admin API** and the **Model API**, both tailored to streamline the AI integration process in game development.

#### **Admin API: Empowering Project Management**

The Admin API serves as the command center for project administrators. With it, admins have the ability to define the scope and specifics of AI models used within their game. Admins can add or remove models as they please, ensuring that the game's AI evolves as needed. This flexibility is crucial for keeping the game's AI components relevant in a dynamically changing project development environment.

#### **Model API: Simplifying AI Deployment for Developers**

The Model API is the game developer's playground. It provides an intuitive way to implement and interact with the predefined AI models. Through a straightforward SDK, developers can access and instantiate these models within their games. The process is remarkably efficient – loading and deploying an AI model is as simple as writing a single line of code. Furthermore, NRN takes care of the heavy lifting, managing the infrastructure and server-side processing, which includes training the AI models on NRN's servers.

NRN is designed to empower game developers to incorporate advanced AI functionalities into their games with minimal coding effort. Performing AI inference or training is made effortless, encapsulated in concise, one-line commands. This simplicity accelerates development timelines and opens up new possibilities for AI in gaming.

## How to Integrate&#x20;

For a games to fully leverage the potential of NRN Agents, three key elements must be integrated:

#### **Data Collection Algorithm**

NRN Agents requires developers to implement a method for collecting gameplay data. The data collection algorithm is critical for teaching your game's AI how players would interact with the environment, enabling personalized and adaptive AI behaviors. If this sounds daunting, don’t worry, it is actually quite straightforward with our guidance.

#### **State Space Definition**

Defining the "state space" or the set of all possible states in which the AI can operate is essential. This involves specifying the features and variables the AI models will use to make decisions. While this task lies with the developers, it's usually a natural step since it aligns closely with the game's design and mechanics. Understanding your game's core elements is key to defining an effective state space for AI training.

#### Action Conversion

The developer needs to define and outline how to convert the AI's output into executable actions within their game.

For example, if the AI chooses to go left, then some alternatives could be:

* Trigger the button that is responsible for moving to the left
* Bypass the button press and directly alter the velocity of the character

Recognizing that these tasks may be new territory for some developers, the NRN team is ready to offer support. The SDK includes helper functions and guidance for setting up data collection and defining state spaces. NRN Agents will handle the heavy lifting of processing and machine learning, but these initial steps by the game developers ensure that the AI is tailored to the unique aspects of their game.
