Goal-Oriented Action Planning: Ten Years of AI Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ต.ค. 2017
  • In this 2015 GDC talk, AI Programmers Chris Conway, Peter Higley and Eric Jacopin revisit the Goal-Oriented Action Planning method of game AI programming to see how it's held up for the last 10 years, and how it influenced the AI of Middle Earth: Shadow of Mordor and Tomb Radier.
    GDC talks cover a range of developmental topics including game design, programming, audio, visual arts, business management, production, online games, and much more. We post a fresh GDC video every day. Subscribe to the channel to stay on top of regular updates, and check out GDC Vault for thousands of more in-depth talks from our archives.
    Follow us on Twitter
    / official_gdc
    Check out our Facebook page for GDC exclusives
    / gamedevelopersconference
    Visit our site: ubm.io/2ctNvqZ

ความคิดเห็น • 86

  • @mystic839
    @mystic839 4 ปีที่แล้ว +45

    it's so simple but using a* to traverse a graph of actions is something i've never thought of. it's burnt into my brain that a* is for a graph of, well, places.

    • @ericjacopin2966
      @ericjacopin2966 4 ปีที่แล้ว +6

      A graph can represent many things. Usually a node represents some kind of state while an edge, which goes from one node to another, indicates a change of state, that is, an action over state. If you want to and if your application domain allows it, then you can chain actions into a plan; it's "only" a matter of making sure that the preconditions of each action of the plan are matched by some (previous) action effects. If you go one step further and add a cost to each edge of your graph, then you can decide to choose an edge because it's cheaper, for instance. Now, why not use A* if it's already in your code base?

    • @Hersatz
      @Hersatz 3 ปีที่แล้ว +5

      I had the very same reaction when he mentioned A* as a mean to plan a route of actions.
      So obvious.
      I take this as a reminder of how important it is to think outside the box.

  • @olon1993
    @olon1993 2 ปีที่แล้ว +48

    Using A* to traverse a graph of actions to achieve a desired world state and find the shortest path from current world state to desired world state is brilliant. So damn clever! Please excuse me, I must start prototyping! 100/10 talk within the first 10 minutes.

    • @boggo3848
      @boggo3848 ปีที่แล้ว +1

      Agree the first 10 minute basically gave me a complete list of things I need to do to just implement GOAP. It made me GOAP!

    • @trollolotommy
      @trollolotommy 7 หลายเดือนก่อน +2

      It is actually the inverse, you find the shortest path from the desired world state to the current state, which in the case of situations with many actions but only a few leading to your goal drastically prune the number of transitions.

    • @olon1993
      @olon1993 7 หลายเดือนก่อน

      ​@@trollolotommy that makes so much sense. Thanks for clarifying 🙂

  • @lifetheoryoptimal3297
    @lifetheoryoptimal3297 4 ปีที่แล้ว +49

    simply persuasively thinking about my own life about it in terms of A* makes me think about how sub optimal I have been, especially lately. I'm like a complex GOAP with a 10% chance of changing my goal for every node traversal

  • @toketokepass
    @toketokepass 4 ปีที่แล้ว +13

    THIS IS GOLD. Thank you so much, exactly what I was looking for.

  • @Kinos141
    @Kinos141 5 ปีที่แล้ว +31

    GOAP is surprisingly easy to write, relatively. I used Unreal Engine 4 to write an AI that looks for a weapon, then ammo, then attacks. It was super cool.

  • @Fitzgibbon299
    @Fitzgibbon299 2 ปีที่แล้ว +5

    Damn, this was a cool listen. Been thinking for a while about a somewhat complex RPG system, and this is an amazing addition to the toolkit.

  • @Hayzl1
    @Hayzl1 6 ปีที่แล้ว +38

    F.E.A.R. still has one of the most deadliest A.I. I can remember in a game. They will try to get you out of your position and will flank you. One of the memorable things about them is they really seemed to communicate and do their actions. Interesting to see how they achieved it.

    • @gersiu2
      @gersiu2 6 ปีที่แล้ว +1

      th-cam.com/video/rf2T_j-FlDE/w-d-xo.html

    • @yrussq
      @yrussq 6 ปีที่แล้ว +6

      +ELH Imp he should start with actual FEAR AI document which was made available years ago.

    • @tatoforever
      @tatoforever 2 ปีที่แล้ว +5

      As surprisingly as it sounds, AI agents in FEAR wheren't aware about the existence of other agents.

  • @thomascook736
    @thomascook736 5 ปีที่แล้ว +22

    People watching this should check out LGOAP. It's a layered version of GOAP that allows to generate much longer plans without a massive computational overhead. Basically, the idea is generate a high level plan (build base -> build army -> attack). Then, for each actions world state in the high level plan, generate a mid level plan that satisfies those conditions. So , for build command center the mid level plan would be (build workers -> build barracks). Then, again, for each mid level actions world state, generate a low level plan that satisfies those conditions. So, for build workers it would be (build scv -> mine -> build scv -> mine -> build scv).
    So you'd end up with a plan like so (when you concat all the low level plans together):
    (build scv -> mine -> build scv -> mine -> build scv) -> (send worker to -> build barracks -> mine) -> (build marine -> build marine -> build marine -> build marine) -> (move army to -> attack on sight)

    • @ericjacopin2966
      @ericjacopin2966 4 ปีที่แล้ว +1

      Has LGOAP been used in a commercial game?

    • @skelhain
      @skelhain 3 ปีที่แล้ว +3

      Sounds a lot like HTN to me, where each high level task can be composed of smaller tasks. Definitely a system that needs more intention.

    • @SmugDarkLoser10
      @SmugDarkLoser10 ปีที่แล้ว

      Makes sense probably for an RTS I assume, or something with many many units? Not sure the terminology but it seems like you should be able just to incorporate a shared data structure into your local agents world view, and that should basically handle it. If you just allow the value of the higher level attributes to dominate the decision making it should work, alternatively could just swap out to a different graph altogether.

  • @HumanityAsCode
    @HumanityAsCode 5 ปีที่แล้ว +81

    I'm seeing a lot of wannabe developers knocking systems they can't even understand in the comments. This is impressive stuff.

    • @jayocaine2946
      @jayocaine2946 ปีที่แล้ว

      What's not to understand lol?

  • @JosephDungee
    @JosephDungee 2 ปีที่แล้ว +1

    I LOVE this Talk!!! I am having to stop watching this because me as a "Player" doesn't want to be aware of all the AMAZING System in the game...right now. I have to say though as a "Programmer and designer" I love what I am learning about how GOAP and The Nemesis System along with others which were implemented in Middle Earth: Shadow of Mordor

  • @mattwla
    @mattwla 6 ปีที่แล้ว +9

    Almost didn't watch this due to some critical comments, but glad I did. Recommended viewing if you are thinking about or are implementing GOAP!

  • @LPFan33
    @LPFan33 6 ปีที่แล้ว +1

    absolute mad man

  • @elliejayliquid
    @elliejayliquid 3 ปีที่แล้ว +1

    That system is awesome, need to find more good talks about it. The presenter is struggling a bit, but I'm still picking up new interesting things on the way.

  • @nickchu35
    @nickchu35 5 ปีที่แล้ว

    What a great talk!

  • @wacky.racoon
    @wacky.racoon 3 ปีที่แล้ว +1

    Awesome, this is a freaking crash course, really nice talk !

    • @ericjacopin2966
      @ericjacopin2966 3 ปีที่แล้ว +1

      Thank you! We tried... :)

    • @October-TE
      @October-TE 7 หลายเดือนก่อน

      ​@@ericjacopin2966 You guys a good job explaining this system, I'm currently working on implementing it into my game and this helps a lot

  • @BungieStudios
    @BungieStudios 2 ปีที่แล้ว +2

    He's the Spider-Man of AI development. I wish more developers invested in game AI. Online multiplayer games have kind of disrupted this. I'm hoping cloud service integration and use of multiplayer mobs inspire a return to their continued advancement.

  • @yrussq
    @yrussq 6 ปีที่แล้ว +3

    Well, what Peter was talking about sounded way more logical and easy to maintain, while Chris' version sounded like an enormous all-in-one blob. I wonder about Chris' general system design of his thing - i hardly believe that it's a blob.
    Anyway, very informative talk!

  • @numgun
    @numgun 6 ปีที่แล้ว +36

    It feels cathartic to see someone struggle when trying to explain an abstract complicated system to an audience of random people. I know that agony all too well.

  • @enikey87
    @enikey87 3 ปีที่แล้ว +6

    Give this man a 1 year full paid vacation. He look so tired of all this shit.

  • @stephenborntrager6542
    @stephenborntrager6542 6 ปีที่แล้ว +1

    11:56 Is that real-time... weapon change!?

  • @netbat
    @netbat 2 ปีที่แล้ว

    wow, I could use some of this to make something genuinely interesting. too bad I only have enough initiative and patience to make what are effectively digital dice.

  • @renderer8337
    @renderer8337 ปีที่แล้ว

    Ozil knows something about ai too

  • @DeMZIrus
    @DeMZIrus 6 ปีที่แล้ว +6

    Why is there 2 GDC logos in lower right?

    • @Sparrow420
      @Sparrow420 5 ปีที่แล้ว +2

      One is from the video, the other one is youtube slapping the channel logo there

    • @Dennisjay9
      @Dennisjay9 5 ปีที่แล้ว +3

      Editor had a hang over

    • @milanstevic8424
      @milanstevic8424 4 ปีที่แล้ว +1

      the small one is to watermark the big one
      and the big one is to watermark the one that we live on, carried by the elephants standing on the giant turtle

  • @SmugDarkLoser10
    @SmugDarkLoser10 ปีที่แล้ว +1

    I don't understand why the goals don't just have an associated action, and you explicitly list the other goals required to reach that goal. The extra step of actions to reach the goal and reconstructing the goals seems like it can be eliminated, no?

    • @ericjacopin2966
      @ericjacopin2966 ปีที่แล้ว

      I would say that any planner today (2023) does associate an action (or even many actions, sorted with the help of numeric preferences) with a goal; and actually it was already the case in F.E.A.R. (you can check this by studying the AI Code of the FEAR SDK). However, linking an action to a goal means your planner goes backward from the goal state to the initial state and time has shown that such backward planners are less easy to debug than forward planners (going from the initial state to the final state).

    • @victoraurelius5334
      @victoraurelius5334 ปีที่แล้ว +1

      No. What you are describing goes more in the direction of Behaviour Trees. Fixed, pre-defined actions, to reach a specific goal.
      Why you use the "extra step" of creating several independent actions is, so that the GOAP planner can/may chose a different plan to reach this goal, each time - depending on costs (= environmental variables). This way, you reach the desired feel of unpredictable, "self-thinking" AI, which you cannot reach with Behaviour Trees.

  • @wasteurtime5677
    @wasteurtime5677 ปีที่แล้ว

    I'm confused. The A.I in Rise of the tomb raider was panned for being very unresponsive. Was GOAP really the right model to go for instead of Behavior trees?

    • @davidboeger6766
      @davidboeger6766 ปีที่แล้ว

      As far as I know, there shouldn't be much practical difference in terms of responsiveness based on that choice alone. Both systems should be able to execute for multiple entities each frame if necessary. As for that particular game, any system can be overloaded or poorly optimized, though if I had to take a guess, it probably is just a case of feeling less responsive than it really is and reviewers and players picking up on that feeling, almost like saying the framerate is low in an FPS when really, the reload animation is just slow.

    • @ericjacopin2966
      @ericjacopin2966 ปีที่แล้ว

      As any other software, a game faces many software engineering problems; planners helps you avoid to put too much effort in programming the behaviors and then maintaining the code for these behaviors: the planner "finds" the BT and builds it online, and sometime finds another BT for a slightly different problem, etc. Whether NPCs were responsive or not may have to do with game design and not only with planning.

    • @wasteurtime5677
      @wasteurtime5677 ปีที่แล้ว

      @@davidboeger6766 I would have to disagree a bit on this after playing it. The intelligent GOAP did not come across in gameplay. Enemies ran out of cover, would easily give up on finding me in stealth and did not use any clever group tactics to route me out because they were all dead within the first 5 mins of engagement. I do not criticize the work that these developers put into their AI design, but I feel this game specifically might have been rushed out the door before it was ready.

  • @amenostalgique
    @amenostalgique 4 ปีที่แล้ว

    why not a HTN & GOAP Hybrid ?

    • @ericjacopin2966
      @ericjacopin2966 4 ปีที่แล้ว +6

      What would you want to achieve with such a hybrid? What kind of specific problem would it solve?

  • @michalrepovsky2208
    @michalrepovsky2208 4 ปีที่แล้ว +4

    what is tarantino doing here?

  • @nickpayne4724
    @nickpayne4724 ปีที่แล้ว

    The third talk about GOAP metrics is completely inscrutable. The graphs make no sense lmao. I wish he would explain what they mean instead of just kind of, saying stuff. "These are actions timings per NPC average and max..." like okay WHAT DOES IT MEAN THOUGH hahahahaha

    • @ericjacopin2966
      @ericjacopin2966 ปีที่แล้ว +1

      Don't hesitate to send me an email (on my title slide); I'll do my best answering your questions.

  • @richard_d_bird
    @richard_d_bird 6 ปีที่แล้ว +8

    but I want hardware accelerated trained deep learning networks controlling game bot ai why can't I have that nowwwww

    • @SeelkadoomPL
      @SeelkadoomPL 6 ปีที่แล้ว +4

      Dick Bird why not use it with goap or utility AI? you can easily find cases where neural nets will be awesome for some low or high level tasks, but any mid-tier reasoning is not really feasible. update your goal list based on output of a net taking health, ammo, etc as input. or use a neural network to populate weights for the a* graph. there's a lot of room to experiment. Good luck with training though.

    • @renzocoppola4664
      @renzocoppola4664 6 ปีที่แล้ว +2

      Data Gathering is still expensive.

    • @xponen
      @xponen 6 ปีที่แล้ว +4

      GOAP using Machine Learning (NN or Genetic) will be very cool. You can Evolve the GOAP's task-cost using Genetics to find the best behaviour, or you can Train an NN to output a set of task-cost values to respond to a varying set of environment, such as enemies (which usually come in waves of different types and also mix).

    • @milanstevic8424
      @milanstevic8424 4 ปีที่แล้ว +1

      @@xponen indeed the best way to apply neural networks would be to train costs (as you said), but ALSO for the sensors, when building the agent's world state, the world itself could be interpreted differently, yielding more optimal decisions.

  • @t1nk3rtail0r
    @t1nk3rtail0r 2 หลายเดือนก่อน

    Very good , this one

  • @xponen
    @xponen 6 ปีที่แล้ว +1

    An idea: What if your task-cost is now dynamic? what if your AI now respond to context? Have you consider using Neural Network to dynamically alter the GOAP's task-cost in real-time? For example, consider an AI bot with multiple guns; you know the "rock,paper,scissor" of games right?; so assume sub-machinegun is good versus 10 small enemy, and rocket is good versus 1 boss, but what if there's a combination of both enemy? there's a lot of combination to deal with and you don't want to hard-code 100s "if-else", but worry not, you can use Neural Network to learn all response and output appropriate response for each of them with just 1 brain!

    • @yrussq
      @yrussq 6 ปีที่แล้ว +4

      Studios rarely use NN. It's non-adjustable, uncontrollable and so on.

    • @ericjacopin2966
      @ericjacopin2966 5 ปีที่แล้ว +4

      Mmm.... Well, actually, dynamic costs are now the way to go. Somehow, the context modifies the costs (e.g. distance-based cost, but it's easy to think of many others) and consequently which actions are inserted. Your sub-machinegun example is close to what happens in current GOAP-based games.

    • @yrussq
      @yrussq 3 ปีที่แล้ว +1

      @Nicholas Millington Predicting world states? NN is not good at pathfinding, at least multiple papers say so.

  • @gutentaco
    @gutentaco 5 ปีที่แล้ว

    Like si estás aquí por la clase del profe Abner :v

  • @u263a3
    @u263a3 3 ปีที่แล้ว +3

    Show me the code

  • @TheSliderW
    @TheSliderW 6 ปีที่แล้ว +26

    This is the saddest talk ever... All this work and it doesn't even show in these modern games.
    It's really too bad that most of the AI in SOM are handicapped by a lack of reachable vertical locations and the abuse of basic unlockable gameplay mechanics making these AI states look insignificant. In TR 2013, gunfights are designed so that you HAVE to kill everyone, ideally at a range and there is no place for any other activity (hide, flee, flank, flush) making the AI look basic as if in a shooting gallery. Quite disappointing when you see all the work put into it.
    I think the game designers and level designers should trust the AI a bit more and give them room to shine. I don't want to have to reference F.E.A.R all the time as the game that trusted it's AI to provide interesting and unpredictable responses.

    • @fappylp2574
      @fappylp2574 6 ปีที่แล้ว +9

      One flustered reviewer / youtuber doesn't understand the depth of the AI and believes it's bad game design
      --> 500,000 sales lost

    • @TheSliderW
      @TheSliderW 6 ปีที่แล้ว +16

      Fappy LP that's either a troll or a misunderstanding of my post. Read again.
      I praise the work but merely state that it doesn't show because of bad design in other disciplines. Thank you.

    • @fappylp2574
      @fappylp2574 6 ปีที่แล้ว +1

      Deliberate misunderstanding. Absolutely agree with the points in your comment and was simply venting my frustration over the issue ;)

    • @fappylp2574
      @fappylp2574 6 ปีที่แล้ว +1

      Obviously 500,000 is serious hyperbole. I don't believe that AAA titles are greatly affected by youtubers opinions compared to reviews on larger media outlets and average review scores, but for smaller projects, namely independant in nature, a single video by a medium to large influencer can decide whether it reaches a significant audience or simply goes unnoticed. This is why quite a few smaller games go down the "whacky elevator-pitch premise" route (Like _FF_ , but with _cats_ ; Like _soccer_ , but with _cars_ ; Like _gmod_ , but with _goats_ ; Like _2d Platformer_ , but with _30s cartoons_ etc.) You can probably boil down half the indy titles in Steam's "New Releases" section to this structure. It's the only thing that will catch an influencer's eye in times of hundreds of daily releases.

    • @fappylp2574
      @fappylp2574 6 ปีที่แล้ว

      Sure, most people do, but if even half a percent of the viewers _consider_ looking at the steam page, that will almost certainly translate to several thousand dollars in revenue. More importantly, that surge of maybe only a couple hundred initial purchasers, will probably bump you into the all-important "New Releases" list, where millions of people will at least _see_ your game for half a day. If you don't make it to that point, you'd be lucky to barely recover the $100 submission fee. I also tend to not trust TB on these issues, as a whole cottage industry has formed around getting people like him to showcase games, often for payment offers in the tens of thousands. Heck "Airscape" (subject of the video you linked) now sits at over 300,000 copies according to steamspy. At $5 and Steam's 30% cut, that equates to over a million dollars. All due to that controversy ;)

  • @renzocoppola4664
    @renzocoppola4664 6 ปีที่แล้ว

    I like how GOAP can be simple, but a turd can't be that fast, but hey, they could run 400 NPCs (with a crapton of work), and that's enough in most games. I think they did well. But my little experience tells me that GOAP/BTs/branchy algorithms aren't appropiate for big scale scenarios.

  • @Restart-Gaming
    @Restart-Gaming 3 ปีที่แล้ว +2

    BORING

  • @gavinpeters9531
    @gavinpeters9531 6 ปีที่แล้ว +1

    The lighting and his anxious jittering is not favourable in apperance... GOAP - Not even once.

    • @kylepena8908
      @kylepena8908 9 หลายเดือนก่อน +1

      Are we really judging the technical merit of a talk based on the lighting?