Artificial Intelligence code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zireael
    Adept
    • Jul 2011
    • 204

    Artificial Intelligence code

    In which file(s) does the artificial intelligence code live?

    I'm watching the NPPAngband source and some port of it and Unangband and FAngband and would have loved to take a look at the AI, but can't find it. Found monster recall and various other stuff but not the AI. Help?
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    src/monster/melee2.c for melee attacks, and mon-spell.c for spell attacks/escapes.
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #3
      In FA you'll find most of the AI in src/onmove.c and src/monattk.c, with some of the support code (on sound and smell) in src/cave.c.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Zireael
        Adept
        • Jul 2011
        • 204

        #4
        Nick, can't find src/onmove.c in the github repo.

        BTW I'm looking more for the code where the monster decides what to do (ranged attack? spell? melee attack? run away?) rather than the damage-dealing code.

        Comment

        • Nick
          Vanilla maintainer
          • Apr 2007
          • 9634

          #5
          Originally posted by Zireael
          Nick, can't find src/onmove.c in the github repo.

          BTW I'm looking more for the code where the monster decides what to do (ranged attack? spell? melee attack? run away?) rather than the damage-dealing code.
          Sorry, typo - it's src/monmove.c
          One for the Dark Lord on his dark throne
          In the Land of Mordor where the Shadows lie.

          Comment

          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎