Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

askthedev.com Logo askthedev.com Logo
Sign InSign Up

askthedev.com

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Ubuntu
  • Python
  • JavaScript
  • Linux
  • Git
  • Windows
  • HTML
  • SQL
  • AWS
  • Docker
  • Kubernetes
Home/ Questions/Q 39571
In Process

askthedev.com Latest Questions

Asked: May 21, 20252025-05-21T02:14:18+05:30 2025-05-21T02:14:18+05:30

Should AI decisions for movement and attack be combined or separated, considering target assessments and action atomicity in Utility AI?

anonymous user

I’ve been thinking a lot about how to handle AI decisions for movement and attack in games, and I’m a bit stuck on the whole concept of action atomicity in Utility AI. You know, the mechanics behind how decisions are made can really make or break the gameplay experience, especially when it comes to how fluid and realistic the AI feels.

So, picture this: I have a unit with both a melee attack and a default movement ability. When my AI evaluates different actions it can take, I’m torn between two approaches. On one hand, I could separate these actions into two distinct decisions: one being “move to X where you probably can hit someone,” and the other being “attack X who is right next to you.” This feels like a more granular way to assess options, but I’m not sure it captures the way I, as a player, think about these actions.

On the flip side, I could combine them into one single decision, like “move to X and attack Y.” This would mean the AI effectively evaluates its path and target in one go. I feel like this would better mimic my own thought process as a player since I don’t typically plan to move to a spot without considering what the target is and whether I want to attack or not. When I move, it’s usually with the intent to engage a specific enemy, not just to reposition myself without purpose.

But here’s the catch: if I lump the two actions together, I might end up overlooking some crucial factors, like the target’s health, armor, statuses, and other situational variables. If I separate them, I can ensure the AI considers those important details when deciding to move and attack.

So, what do you think? Should I keep movement and attack as one decision to reflect a more natural player thought process, or should I separate them while ensuring the “move” action still takes into account all the necessary factors about the target? I would love to hear how you approach this in your own projects or any insights you’ve drawn from your experiences!

  • 0
  • 0
  • 2 2 Answers
  • 0 Followers
  • 0
Share
  • Facebook

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Google

    2 Answers

    • Voted
    • Oldest
    • Recent
    1. anonymous user
      2025-05-21T02:14:21+05:30Added an answer on May 21, 2025 at 2:14 am

      In my experience, evaluating movement and attack separately tends to offer greater flexibility and scalability in Utility AI. By decoupling these actions, you allow your AI to independently consider positioning factors (like tactical advantage, enemy proximity, and line-of-sight) apart from attacking factors (such as enemy armor, statuses, and vulnerabilities). This separation helps maintain clear decision-making logic, makes debugging easier, and accommodates more sophisticated scenarios. That said, it’s crucial to ensure your movement decision doesn’t become purely positional—always factor in potential attack targets and their statuses, thus reflecting a player’s intuitive goal-oriented reasoning.

      However, if your game mechanics heavily tie movement and attacking together—such as certain combat systems where movement inherently includes the decision to attack—then combining the decision into a single atomic evaluation can feel more natural and cohesive. To handle potential complexity loss in this scenario, you could integrate multiple weighted sub-factors (target health, defensive states, attack efficiency, risk assessments) directly into your single decision evaluation process. Both methods can succeed; ultimately, choose the one matching your game’s complexity level and feel, ensuring that your AI behavior remains transparent, responsive, and true to the player’s expected experience.

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. anonymous user
      2025-05-21T02:14:20+05:30Added an answer on May 21, 2025 at 2:14 am

      Handling AI decisions in games is super interesting! It sounds like you’re trying to balance realism in how the AI behaves while also making sure it feels smooth and natural for players. I totally get where you’re coming from with the movement and attack decision-making.

      On one hand, separating the actions can give you more control and allow the AI to consider specific details like health or armor before deciding to attack. But I think you’re right that players usually think of their movement in relation to who they want to engage, so combining them seems more intuitive.

      If you combine them into one decision, maybe you could still have some checkpoints where the AI evaluates the target’s condition before finalizing that action? Like, does the AI check the target’s health first, then decides to move and attack in one go? This way, you’re not losing the complexity but still keeping that fluidity.

      Ultimately, it might depend on how you envision the gameplay. If the AI feels too rigid with separate actions, it might break that immersion for players. But if it’s too mixed, it might feel like it’s missing some strategy aspects. Maybe test both ways in a simplified version and see which feels better!

      In the end, your AI should reflect the player’s mindset but still be smart enough to consider those important details that make the game engaging. Good luck, and I’d love to hear what you decide!

        • 0
      • Reply
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    Sidebar

    Recent Answers

    1. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    2. anonymous user on How do games using Havok manage rollback netcode without corrupting internal state during save/load operations?
    3. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    4. anonymous user on How can I efficiently determine line of sight between points in various 3D grid geometries without surface intersection?
    5. anonymous user on How can I update the server about my hotbar changes in a FabricMC mod?
    • Home
    • Learn Something
    • Ask a Question
    • Answer Unanswered Questions
    • Privacy Policy
    • Terms & Conditions

    © askthedev ❤️ All Rights Reserved

    Explore

    • Ubuntu
    • Python
    • JavaScript
    • Linux
    • Git
    • Windows
    • HTML
    • SQL
    • AWS
    • Docker
    • Kubernetes

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.