Results 1 to 20 of 20

Thread: Game AI stuff

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Mercury Member Thermal's Avatar
    Join Date
    Jul 2008
    Location
    "United" Kingdom
    Posts
    5,429
    Blog Entries
    7

    Default Re: Game AI stuff

    as u can tell im not amazing at this or i wouldnt hav 2 ask but, im modding the retrofit multiplayer version of the game, but there doesnt seem to be a descr_character txt file in the folder, the nearest thing to it is a export_descr_character_traits, strange seening as every other version or mod of the game hav both files...
    any ideas which descr_character file the retrofit type use? is it just the descr_character from normal medieval? it should hav 1...
    i just want to add movement point up to make 4 a better AI
    Last edited by Thermal; 08-13-2008 at 14:22.

  2. #2

    Default Re: Game AI stuff

    I answered in Modding movement rates? thread.

    Increasing the movement rate will only help with some pathfinding issues with the game, with some armies getting stuck. Chances are if this is the only thing you change you will not see a notable improvement in the AI, other then perhaps improved early game expansion.

  3. #3

    Default Re: Game AI stuff

    CavalryCmdr (or Nikolai): we're having a guy make a massive new map for us, and I raised to him the concern that cities should be within 1 turn from each other for the AI to make proper decisions. Is that correct, or what is the proper guideline for how far the cities can be spaced out?

  4. #4

    Default Re: Game AI stuff

    Hello,
    I have read this important theme and have decided to participate in discussion.
    As Nikolay 1962 said: the main problem is an unwillingness of AI to develop a city and as a consequence to employ strong and expensive units. Other problems: how to force Pathfindig to work together with AI type according to mode's strategy.
    AI analyzer (we name it so) a choice of the decision for behaviour of fraction consumes the following information:
    1. Military balance of units (it is possible to change it)
    2. AI type (each type is fixed in engine and to change it is impossible, but it is possible to jump from one type to another changing AI label)
    Points 1+2 represent military force of fraction and warn AI against an attack
    3. Economy (it is possible to change and create different ways) involving AI and stimulating an attack
    4. Diplomacy has limited character for AI and is subject to strong development and change in the near future
    5.Pathfindig depends on complexity map (it is possible to change it) and has executive character for AI after AI analyzer will compare conclusions from 1+2 (against an attack) and 3+4 (for an attack).
    In our mode “Rusichi” http://www.twcenter.net/forums/showthread.php?t=187774 we have tried to change concept MTW2 (many identical fractions with the same power) and to create preconditions for manufacturing new type of AI, meeting the requirements of our gameplay mode. As the reason to it was that we had broken in a hard way the balance of points 1,2,3 in comparison with the original game. The following points are 4,5. Usually at first the universal AI is made, proceeding from the general requirements. Maybe, as the result, we will also receive universal AI, maybe not. It will depend on limits of updating of AI connected with a game engine.
    We have broken down military power of units into three classes. Each class has the factor G equal to the relation of the sum of hiring and the maintenance to military force of division (the sum of military characteristics of a separate unit increased by quantity of units in division).
    So the first class of units has G from 0-0,5-those are units of the early period and AI them employs standardly.
    The second class of units has G from 0,5-0,8-those are already professional units and AI has no problems with them
    The third class of units has G from 1,0-1,5 are unique units and AI does not employ them in general. These units are accessible only to the player.
    Thus, varying factor G, it is possible to achieve from AI a fair hiring. Frankly speaking, the big changes are needed in fraction economy in order for the effective hiring of units. There is a need of making different types of economy for fractions. The type of economy is based on the speciality of fraction (speciality of agriculture, trade, religion etc.) and is connected with the result of military class unit.
    Also, it is necessary to talk about generals. AI often proposes them and makes them in a family. Generals are unique units and consequently are useful in the military plan and are harmful for the economic. To adjust their number, the second class units with characteristics of murderers of generals must be created. AI actively uses them especially in auto-calc.

  5. #5

    Default Re: Game AI stuff

    A major problem, as I see it, is the fact that most AI (and associate things like pathfinding) tweaks, even full AI modifications (like Lusted's), awesome though they are, are aimed at making the vanilla game-play more interesting.

    The AI of the game is smarter and harder, yes, but the game remains largely identical.

    What I'd like to see, and this is something that we hope to achieve later with our mod, is an AI (+ associate elements!) rewrite that balances out a new type of game-play. An AI that changes the game-play.

    A lot of good or innovative ideas are fully possible to implement, and we've even implemented some of them. But while fully possible to put an idea in the game as it is, the AI doesn't react to those innovations in the way it should. For example our villages - 3x3 regions with level 1 capped towns - great idea and large game-play tweak in theory (they are hard to defend and potentially very valuable in numbers). The problem: the AI completely ignores 3x3 regions. And while this fact by itself can and does lead to its own features, it forced us to lower the value of villages to balance the game (the idea sort of fell through )

    Forcing the AI to behave "the way it should" to fit new game-play is much harder and requires a lot more work, but I think it is ultimately worth it.

  6. #6

    Default Re: Game AI stuff

    we're having a guy make a massive new map for us, and I raised to him the concern that cities should be within 1 turn from each other for the AI to make proper decisions. Is that correct, or what is the proper guideline for how far the cities can be spaced out?
    Yes, if posible, all setlements should be exactly one turn away from all adjacent settlements for optimal AI performance. Though according to nikolai1962's map modding research actual settlement locations dose not matter as much, but the "center" of a region should be 1 turns movement from the "center" of all adjacent regions. I recomend the mapper for all mods read this thread.

    @Tchouk:
    The problem is that new "gameplay" elements need to be made within the scope of the AI, not the other way around. This limits the modding capability as far as gameplay it's self goes as the vanilla game it's self includes gameplay elements that are not within the scope of the AI, for example the AI is incapable of recognizing the difference between castles and cities.

    @MarkaR:
    Your post is dificult to read, so I may be misunderstanding cirtain aspects (I assume English is not your first language)
    As Nikolay 1962 said: the main problem is an unwillingness of AI to develop a city and as a consequence to employ strong and expensive units. Other problems: how to force Pathfindig to work together with AI type according to mode's strategy.
    This is not entirely true, the AI will refrain from building armies if invade="invade_none" is used when not at war (descr_campaign_ai_db.xml)and will build up it's economy and military buildings, though it will still try to maintain military balance with neighboring factions.
    2. AI type (each type is fixed in engine and to change it is impossible, but it is possible to jump from one type to another changing AI label)
    Points 1+2 represent military force of fraction and warn AI against an attack
    This I dont really understand, the AI labels themselves can be changed by modding the descr_campaign_ai_db.xml. If you are unable to open/mod xml files I suggest googling "xml marker" its a free downloadable xml editor that I find extreamly well made, it is now the program I use to open/edit all xml and txt files.
    5.Pathfindig depends on complexity map (it is possible to change it) and has executive character for AI after AI
    again all mod mappers should read nikolai1962's map modding research thread (link above)
    We have broken down military power of units into three classes. Each class has the factor G equal to the relation of the sum of hiring and the maintenance to military force of division (the sum of military characteristics of a separate unit increased by quantity of units in division).
    I have tried a similar method, keep in mind that the AI is more interested in the cost-effect of a unit rather then a unit's actual strength, also when considering cost-effect the AI is not able to consider upkeep, only initial recruitment cost, thus the upkeep of all units should be made a set percentage of the recruitment cost. Thus to get the AI to build higher level barracks etc you must make the higher tier units more cost-effective rarther then just better. Also the formula the AI uses to determine cost-effectiveness is quite a mystery to me.
    Also, it is necessary to talk about generals. AI often proposes them and makes them in a family. Generals are unique units and consequently are useful in the military plan and are harmful for the economic. To adjust their number, the second class units with characteristics of murderers of generals must be created. AI actively uses them especially in auto-calc.
    The AI is capable of spawning generals as needed, more on harder difficulty settings. This cannot be controled, however scripting in a refund for all generals in an AI faction (generals, not the unit associated with them) is posible and limits the impact they make on the AI's ecconomy.

  7. #7

    Default Re: Game AI stuff

    @Tchouk:
    The problem is that new "gameplay" elements need to be made within the scope of the AI, not the other way around. This limits the modding capability as far as gameplay it's self goes as the vanilla game it's self includes gameplay elements that are not within the scope of the AI, for example the AI is incapable of recognizing the difference between castles and cities.
    Yes, but you could potentially write a script that would mimic, to a certain extent and in some cases, an AI that does recognize the difference. It obviously wouldn't be anything you could call elegant, but there are a lot of possibilities to "trick" the AI into behaving the way you want it.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO