User Tag List

Results 1 to 3 of 3

Thread: Good Decent A.I.

  1. #1
    No Products Registered

    Join Date
    Jun 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Good Decent A.I.

    Hay everyone, I've been working with mf2 for quite some time now, I'm wanting to make a game that has A.I. that reacts in real time and thinks how and who it attacks quickly and swiftly, just like in Kingdom Hearts. What should I do in order for the A.I. to think properly and not get confused on certain arias (like if 2 enemies are in the partner A.I.'s attack range,the A.I. thinks what attacks it will use on which one and another attack on the other enemy, or just attack one enemy. Stuff like that.) if there are any ideas on this using the frame and event editor, that would nice.

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Decent A.I.

    AI is generally a very broad topic, you will have to deal with each specific narrow problem on its own. The first step is to plan what you want your AI to do from A to Z and then try focusing on how to implement it.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Good Decent A.I.

    I don't know what kind of game you're doing, but as you mention a Square Enix RPG, so I'm thinking RPG battle.

    Now, there are so many factors involved in a game like this. It's incredibly hard to take all the spells, statuses, reflect powers, stats, and health points into account and calculate a good attack. It's better to just let the enemy do some trial and error.

    Here's how I'd do it. First, you need a priority list for the enemy.

    Keep your health above 500, 10 points
    Kill a player, 10 points
    Damage the player that have the lowest health, 5 points
    Damage yourself, -8 points
    Die, -100 points
    [check only every fifth turn] Keep your health above 1000, 30 points
    [check only every third turn] Don't have a negative status effect, 30 points

    Now, you need the game to have a battle system where all calculations related to an attack or action is separated from the graphics that displays what happens. This way, you can simulate an attack without showing it on screen. Now, let the enemy simulate several random attacks/spells/actions. Calculate how many points the enemy score based on the priority list. If this particular action/attack resulted in more points than a previous simulation, store it. When all simulations are over, you'll know which action/attack that worked best, so perform it!

    This can be very nice, because it's semi-unpredictable but not random. As the enemy performs a limited number of simulations, it might not pick the best action, but it will pick a good one based on the priorities given to it (then of course you can iterate through every possible action to figure out which one is best by brute force, but I'd personally not do that, a little randomness makes things feel less mechanical). It should work nicely in both a turn based RPG and a realtime one. Also, when creating a new enemy that acts differently, you don't have to re-program anything about how the game works, just give the enemy a different priority list and how many simulations this particular enemy will perform (fewer for dumber enemies, and more for smarter). This saves tons of time and is at the same time really flexible and allows really varied enemy behaviours.

Similar Threads

  1. My first decent MMF Flash app
    By Christian_Wheel in forum SWF/Flash Export Module Version 2.0
    Replies: 4
    Last Post: 13th September 2010, 06:43 AM
  2. Decent logo
    By Robin_Manager in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 3rd September 2008, 05:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •