Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Is it worth starting to integrate Barracuda AI at this point?

Discussion in 'Barracuda' started by TiggyFairy, Jun 22, 2023.

  1. TiggyFairy

    TiggyFairy

    Joined:
    Dec 22, 2019
    Posts:
    417
    So I'm running a tile based first person game I've made, and I really want the enemies to be at least semi smart. So I have a few questions:

    Is it worth getting Barracuda involved yet or should I think about making my own learning AI/getting one from someone else?

    Also, when making that AI, would it scale better if I were to store the tile map array centrally, locally on a sub-scene basis - or have every enemy map their own small part out themselves? Or, perhaps, to not map tiles at all and just have the enemy route-find based on a nav mesh then translate that into tiles?

    I've never done this bit before, so all feedback and suggestions are appreciated.
     
  2. Deleted User

    Deleted User

    Guest

    Could you describe your input space and output space more, with some examples? Depending on the complexity of those, it will probably be easiest to code your own AI algorithms rather than using machine learning.

    If I'm being pedantic, Barracuda is not AI, it's an inference engine. Mods maybe wanna move this post to ML-Agents?
     
  3. TiggyFairy

    TiggyFairy

    Joined:
    Dec 22, 2019
    Posts:
    417
    Basically I'm making a Dungeon Master/Eye Of The Beholder/Grimrock style game. The AI needs to navigate a 3D world that's essentially made of cubes or layered squares. The AI must be able to navigate around pit tiles, lava, and so on. Identifying the tiles is no problem. I can make a very dumb agent that just attacks the player very easily. But I would like it to do more, and I would like it to be unexpected. I was wondering if Barracuda was ready (not crashing) enough that I can use it in a game that will likely still be in development when Barracuda is fully released.

    Personally I think a fairly simple AI would do as it's on a grid. There are limits to where it's going to be able to go, and it can't get stuck, except in ways that work for the game (i.e. behind a gate).
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    i'd also vote for hand crafted solution or check asset store ones, some allow "programming" the AI brain to react situation & world things etc..

    also curious,
    what would be unexpected move from AI inside grimrock like dungeon?
     
    TiggyFairy likes this.
  5. TiggyFairy

    TiggyFairy

    Joined:
    Dec 22, 2019
    Posts:
    417
    Yeah I'm leaning towards hand crafted here.
    As far as I can tell, the only things that would normally go bad in a dumb Ai version is if they all fell down holes or into the traps and killed themselves. The former is easy to solve. The latter depends on if the trap moves around. And how fast the enemy is. Spikes that run in different patterns are something they're prone to running into because it's not predictable and hard to program them to follow the patterns.

    Buuit add in learning AI, and all bets are off. If they're smarter, and their rewards are set wrong, they could start solving the puzzles themselves. Especially the pressure plate or button ones, though no the key ones unless you give them the ability to use key objects or just pass through doors (like in Dungeon Master) . Which I might, under limited circumstances. Opening doors, etc, is something that enemies in these sorts of games can do. Really depends on the abilities you build in Too much of that, though, and they'll gang up on the player as an army, after basically tearing your game apart.
     
    Last edited: Jun 28, 2023
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,988
    i'd actually like to lure enemies into moving spikes.. : D

    most of those interactions could be still hand crafted quite easily..

    now can imagine complicated things like,
    - 2 different types of enemies meet for the first time, Enemy A then suddenly eats Enemy B (to gain some extra power), or Enemy A uses B as a lure for the player, or Enemy A uses B as an weapon even..
    - if Enemy B is flammable & explodes, Enemy A might set it on fire, to burn through wooden door..
    - any anything you can imagine.. then it gets complicated (although probably still could handcraft hundreds of different interactions/interfaces or properties, that monsters "know" how to use objects)

    other refs:
    https://en.wikipedia.org/wiki/Emergent_gameplay
     
  7. TiggyFairy

    TiggyFairy

    Joined:
    Dec 22, 2019
    Posts:
    417
    Dually noted XD I'll make sure you can. Though I meant them wandering in before you even meet them. lol

    You've been reading my notes lol That's certainly the sort of thing I might try to prompt an AI into, if it didn't break the game.