Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by patrick_scheper · Sep 14, 2016 at 12:26 PM · ainavmeshnavigationenemyai

Utility AI

Hi there.

I am just fiddling around and experimenting inside Unity now for over a week by trying to create something like an Utility AI. Over the months I have been busy with behavior trees and FSM.

Right now I am trying to recreate something that the awesome guys at Apex AI have made. Here's the video: https://youtu.be/jse_ZleruJU?t=24m29s

alt text

Like shown above, I am trying to create a grid where all the positions inside the navigation area are. These positions would change their score, just like Apex did, on the amount of monsters around the AI. (So the AI always moves towards the best suited position inside the area.)

Problem is, I couldn't find a lot about Utility AI on the internet and nothing about this kind of grid positions.. I hope somebody can point me into the right direction, so I can continue my work!

Thank you in advance, Patrick

e91ce6ab8a8d141197333850598a86f3.png (303.4 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Lahzar · Sep 16, 2016 at 11:40 PM

Hey Patrick,

I have tried to fiddle around with utility AI, but I have not really got into it yet. Still I think I have done what you're trying to do, in my own 'game.' I made a cover system based entirely on this document. It is not a generic solution, as the one Apex probably has, but it works nicely.

If you use A* pathfinding you don't have to generate any grid, as you already have one. With navmeshes you have to use fustrums and complex math.. stuff...

Utility Theory is just where your AI evaluates multiple options, score them based on a (weighted) preference, and select the option that gives the best score. In a nutshell.

Anyways, once you have the grid its not very difficult. You just run through a small selection of the closest nodes in the grid, and perform simple checks on them, like "is this node in the preferred firing range?" or "is this node dangerously close to an enemy?" etc. I hope you get the point with these terrible examples.

Then add a number (a tag in A*) to this node based on what checks are true or not. I would recommend using enums for this to keep track of everything.

You could also then add score based on things like time it takes to reach this node. Anything really. Have fun.

~ Angelo

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image patrick_scheper · Sep 19, 2016 at 03:32 PM 0
Share

Angelo, I thank you for your reply! Your response points me, I think, in the right direction where I want to head.

Like you said, and as I though, maybe it's better to use the A* pathfinding ins$$anonymous$$d of navmeshes. I'll fiddle around a bit. Thanks again!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

nav mesh agent not following properly 0 Answers

Way to find closest point in a specific area on navmesh. 0 Answers

CS0246: The type or name space name ''NavMeshSurface'' plz some help 0 Answers

Navmesh Agent "move back" when player comes to close? 1 Answer

NavMesh.SamplePosition returns point outside the NavMesh 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges