[RELEASED] RVSmartAI - node based utility AI framework with runtime editing and prefabs support!

>>RV Smart AI<<
https://assetstore.unity.com/packages/tools/ai/rv-smart-ai-146170

RV SmartAI is a lightweight, flexible and high-performance utility AI framework.
With SmartAI you’ll be able to visually model complex AI behaviours for your game with ease.

It can be integrated into any project, regardless of stage, as it doesn’t force you to refactor all of your existing AI code, and can easily coexist and support your already implemented AI logic. Transfer only what you want of your game’s logic to SmartAI! For example you can leave your AIs movement logic untouched, and implement just your fighting logic, or even only target selection logic via AI graphs.

SmartAI is the only graph-based utility AI solution on the asset store that fully supports prefab workflows in AI design process: create reusable graphs, nodes and even single graph elements, using Unity’s powerful prefab variants and property overrides.
Full runtime editing support makes fine-tuning values for utilities so much faster and easier, as you have real time feedback on how changes you’re making affects your AI behaviour.

One of the biggest advantage of utility AI concept over FSMs or behaviour trees is that it’s much more scalable in terms of complexity while remaining simple and easy to maintain, understand decision process and debug.

Included modules

  • RV Smart AI
    main module responsible for AI, node based editor

  • RV Load Balancing
    spreads work for multiple AI agents over many frames so you won’t have those nasty spikes in profiler

  • RV Logger
    simple tool to easily control debugging levels in your classes

  • RV Utilities
    general utilities/helper classes

Note that all these modules are independent from main RV Smart AI module so they’re very useful for other stuff too, even not related to AI!
There are also many ready to use AI examples wrote with flexibility in mind using interfaces, so you’ll be able to easily use them as base for your game and modify them.

Features
► Visual node graph editor - write your AI behaviours in C# and play with them like legos
► As easy to use as behaviour trees while being much more scalable in terms of complexity
► Easily integrated into existing projects, regardless of stage
► Doesn’t force you to refactor all of your existing logic, only parts you want to
► User friendly and easy to use
► High performance and load balanced
► Runtime visual debugging
► C# source for all modules!
► Runtime graph modifications - see changes in your AI behaviours in real time and save a lot of time tweaking values
► Fully supports Unity prefab system - including nesting, variants and property overrides for graphs and all graph elements
► Unity’s undo system support
► Core system has no runtime allocations after initialization
► Written with flexibility and scalability in mind, as separate modules
► Many independent modules included in package
► Can be made to run on own threads (core system doesn’t use Unity API)
► Lot of script templates and base classes for common usages
► No subscription, no seats limits, buy once and use freely
► Responsive support via Discord and Unity forums

Prefab system details

Create reusable graphs, nodes and even single elements of nodes for the best workflow experience!

You often need many graphs that are virtually the same with only one value change or one element added for different npcs in your game.
Normally you would need to maintain all of them to make sure they stay in sync when updating them, but not with SmartAI!
Create one base graph like you would normally and then make variants of them using standard Unity prefab workflows. This way you can have graphs with variety of difficulty levels, different tactics etc. while still basing on the same base graph… possibilities are endless!

Graphs are prefabs by default, you can create variants of graphs and also all elements of graph can be made prefab, nesting and overrides are also supported.
When you change value of some property of prefabed graph element you can use normal Unity override menu on that property to apply it to prefab or to revert:

Working with prefabed graphs is basically the same as working with every other Unity prefab, so if you’re familiar with prefab workflows in Unity, you will feel at home working with SmartAI graph prefabs.
If not - no problem, prefabing is not necessary or forced in any way and you can still use graphs just like any other asset files and don’t bother with prefabing.

Let’s take a look at how prefabed graphs looks like in practice:

As you can see, prefabed graph elements are marked with blue font.
In second node(lower one) we have nested prefab. Node itself is prefab, and it has one utility that is also a prefab.
You can make prefab from any graph element directly in graph window and also unpack them, all without even leaving graph window, using context menu on nodes.

Join our Discord support server to discuss RVSmartAI, utility ai, or any other Unity development topic!

Thanks for reading
Ronis Vision

4 Likes

1.1 Update!
-Unity 2019 support
-updated modules: new api for managing load balancing; now you don’t need to have ‘SmartAIUpdater’ object on scene
-update frequency can be set separately for every ai thanks to new load balancing api
-general code cleanup and improved encapsulation in provided examples

This update is mostly about LoadBalancing module update which provides simple, yet very powerful api to manage any method calls in your project.
You register your method to load balancing system via Register method, when you want this method to be called regularly with some frequency.

Lets take a look at some code

LoadBalancerSingleton.Instance.Register(this, Tick, updateFrequency);

First argument is object-owner that register this method. It isn’t really used by system, it’s more for organization and debugging, so you can see what objects registered what methods.
Second one is your actual method you want to be called, with float argument for delta time - in some cases it’s useful, and doesn’t hurt if you don’t need it.
Third argument is actual call frequency, in hz - meaning how many times per second this method should be called, so if you pass 1 here, this method will be called once every second.

Unregistering is even simpler:
Overload when you want to unregister only one method

public void Unregister(object _object, Action<float> _action)

And overload when you want to unregister all methods registered by your object

public void Unregister(object _object)

All methods registered to this system will be automatically load balanced, meaning they won’t be called all at once in one frame, but spread across many frames.
It can be great replacement for ‘manager’ objects and even Unity’s Update method in Monobehaviours:
it’s much faster to call, because it isn’t called from unmanaged C++ engine layer like Monobehabiours are, and you have better control over then you want those method to be called - for example you may want your method to be called even if gameObject is disabled.
To have behaviour like Unity Update method you just put Register method in OnEnable, and Unregister in OnDisable. Just make sure if LoadBalancerSingleton.Instance isn’t null in OnDisable, since you don’t know if it won’t be destroyed first.

wow look strong

Do you have document or sample scenes?

1 Like

Yes, I sent you link to online documentation. There are few example scenes with simple behaviours provided like flee, follower, patrol.

Look good but I’ll need to see it in action first. Some videos and/or demos please ? !!!

1 Like

@Roni92pl Is this suitable for 2D Card games AI such as Rummy and Poker?

Good to see more Utility AI assets, and great to see one with nodes/visual workflow. I’ll definitely be checking this out for my next project.

videos / demos / tutorials are needed please.
I’ve bought too many AI assets on a whim, only to be disappointed later. Looks interesting but there’s very little information about how it actually works and how to use it.
Says, “User friendly and easy to use”… can you show us some examples?

2 Likes

Working on it :slight_smile:

2 Likes

this is cool, show me a village sim, that’s what you made this for right?

1 Like

Why don’t you just show us short videos of those working screens ? We can figure how good the AI is with blue cubes, we don’t need the full blown character animations.

You can then keep working on a more elaborated trailer if you want to but at least we’ll see it in action.

1 Like

Hi there! The tool looks awesome :smile:

I use PlayMaker currently for a lot of AI logic as well as actual interactions (attacking etc). Would there be an easy way to hook in PlayMaker with a system like this?

best,
craigz

Thanks! I’ve never used PlayMaker before, but I can see it is visual scripting tool.
You see SmartAI is a framework, there are visual elements in graph, so that may seem confusing, but those elements are just scripts you write to use in SmartAI, so you can hook any third party you want as long as you can write some code :slight_smile: Like I mentioned in features, ‘actions’ you have coded for your AI don’t even have to be changed much to use it with SmartAi, just extract them to separate classes and inherit from AiTask, and then you can use them as ‘legos’ in graphs.

Haha, I’d love to! :wink:
But honestly I started this project just because I was fascinated with utility ai and wanted to have my take on it for quite some time… but it grew to quite serious project and I realised it could be make into product, so others can benefit from it. Cheers.

I’ve made some presentation using follower example

1 Like

You need to reupload that at 1080p, its way too hard to see the UI at 720p.

Yeah, after your post I checked video on YT and it’s more blurry than file I uploaded, yt compression I guess.
Re-rendered it in higher res with better quality and uploaded, should be much better now;
updated post with video.

one click smart follow - I could get used to that. how does it scale to say 1000 agents? it spits out entity burst c# code ? :smile:
wait hang on a second, is this a potential field navigation I’m seeing?

Scales pretty good imo, with 1k agents wandering(moving from random place to other random place with destination blocking) takes about 0.3ms~ - you can see it in screenshot in first post. It’s not using burst, and it doesn’t need to;
it’s good old load balancing; btw logic on own thread + good load balancing and high lvl optimisation, and you don’t need burst and all that ecs fuss.

Updated every frame or staggered?