1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Forts?

Discussion in 'Civ4 - Fall from Heaven' started by Jamz, May 21, 2009.

  1. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    That's very much the wrong way to be going. If we remove everything that the AI doesn't do well, because the human can "abuse" it against the poor little AI, then there won't be a game.

    It should be possible to prevent the AI from building forts, to stop them from wasting their tiles on an improvement they don't use correctly, without having to remove forts entirely.

    This may well be less of an issue in 0.41, since the AI only seems to be building about one fort per city.
     
  2. sable_twilight

    sable_twilight Chieftain

    Joined:
    Dec 17, 2008
    Messages:
    51
    Location:
    Denver, CO
    What if they supplied a slight commerce bonus? 1 coin, plus one with road - representing the protection it offers against small time banditry and toll houses. It might at least help offset a little both the spamming and economic issues the AI seems to have.
     
  3. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    4,272
    You know, the same could be said for mages.
    In all my games I have newer seen the AI use those competently.

    Heck, if you remove everything that the AI doesn't do well, you will end up with something like 50% of vanila civ.
     
  4. MagisterCultuum

    MagisterCultuum Great Sage

    Joined:
    Feb 14, 2007
    Messages:
    16,360
    Location:
    Kael's head

    The distance requirement for a fort building spell could very easily be made to only apply to the AI. You could make it take other factors into account too, like how soon nearby forts will upgrade, how close the tile is to their boarders, whether the tile is being worked and what its yields are or could be with other improvements.
     
  5. travathian

    travathian Warlord

    Joined:
    Jan 15, 2003
    Messages:
    262
    There is a difference between using something competently and using it at all. The AI the vast majority of the time doesn't put units in forts. Secondly, that mage doesn't actively hurt the AI every single turn for the rest of the game like building a fort on a key tile can. At the very least the mage can defend in a stack. And, at least in my games, I do get hit by spells from opposing mages. No, the AI doesn't use them as well as human players can, but at least they do something with them.
     
  6. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    I just found an AI city in the game I'm playing where it spammed 5 forts, so it looks like 0.41 didn't completely solve the problem.

    If all of those aspects were actualized then your suggestion would be a worthwhile solution.
     
  7. Jamz

    Jamz Chieftain

    Joined:
    Aug 25, 2007
    Messages:
    17
    Maybe a challenge mode: disable forts? :)

    That would really make my day.
     
  8. Farmer Bobathan

    Farmer Bobathan Sanity is for the weak

    Joined:
    Oct 6, 2007
    Messages:
    251
    Location:
    Michigan
    what if the radius around the fort had a higher defensive bonus than the fort itself, giving incentive to actually attack the fort and not just move around it?
     
  9. Emptiness

    Emptiness []

    Joined:
    Jan 7, 2009
    Messages:
    1,922
    I don't understand how that would affect automated worker placement of forts.
     
  10. Farmer Bobathan

    Farmer Bobathan Sanity is for the weak

    Joined:
    Oct 6, 2007
    Messages:
    251
    Location:
    Michigan
    it would make forts useful so when automated workers make them it isn't a complete waste of a plot
     
  11. ICanHasName?

    ICanHasName? Warlord

    Joined:
    Feb 24, 2009
    Messages:
    272
    At the very least the AI needs to learn to only build them in choke points. Dropping a fort next to your city gives a free siege base that I think even other AI's are smart enough to use against them. Also, it wastes a perfectly good square of land, especially when they drop one on a flood plains.
     
  12. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    4,272
    That should be farely easy to do.
    Just add a check in the AI code that it should only build forts when the tile has at least 2 sides surounded by moutains, or water, or a combination.
     
  13. travathian

    travathian Warlord

    Joined:
    Jan 15, 2003
    Messages:
    262
    M = Mountain
    O = Ocean
    F = Fort
    X = Hills/Plains/whatever

    The following configurations meet your criteria

    XFFFFFFFFFFFFFFFFFFFFFFFFFX
    MMMMMMMMMMMMMMMMMMMM
    XFFFFFFFFFFFFFFFFFFFFFFFFFX

    XFFFFFFFFFFFFX
    MMMMMFMMMMM
    XFFFFFFFFFFFFX

    XXXXXXX
    XXMFXXX
    XXFMXXX
    XXXXXXX

    XXXXXXX
    XFMFFXX
    OFFOOOO

    I can keep going if you'd like, but I hope you see how difficult the task really is. It isn't too complicated for me to explain to another human being what a choke point is, it is entirely different to explain it to a computer. The AI needs to understand pathing, terrain use, potential border pushes, etc. No sense in building rows of forts along mountain ranges. No sense in building a fort in an area that the opponents border will push into in the near future. No sense in building a fort in the middle of your empire, like in Example 3. No sense in building forts on the coast if there is no city nearby. These are trivial to show to a human, but incredibly difficult to spell out for an AI without bogging down the computer.
     
  14. ICanHasName?

    ICanHasName? Warlord

    Joined:
    Feb 24, 2009
    Messages:
    272
    I belive a choke point is defined as a square it would take X moves to get around if blocked. Notice that forts show up in choke points upon map generation? Some sort of fort-in-good-location code is already there, the AI just needs to learn how to park archers in them when it would be smart to do so (that sounds hard though :/)

    and the "build forts next to our cities for the +defense" needs to be removed. Even if those forts were garrisoned who would attack them? They would just move units away from the city under attack.
     
  15. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    4,272
    You are wrong. I was talking about if 1 field is surounded from at least 2 sides, not if multiple fields are. If there is a XX field, it is automaticly not good.

    In a 9 point grid:

    OOX
    XXX
    XXX

    OXO
    XXX
    XXX

    OXX
    OXX
    XXX

    OXX
    XOX
    XXX

    OXX
    XXO
    XXX

    ect.

    The AI would ignore all chokepoints that require more than 1 fort. Yes a few of them would be flops, but imagine how rare these are. How often do you find two mountains in the middle of plains.
     
  16. Marnok

    Marnok Marnok

    Joined:
    Mar 24, 2008
    Messages:
    506
    To check for chokepoints, just check the N-S pair of tiles, and the E-W pair. It may not be a useful chokepoint, but if both of a pair are blocked, it should be some sort of bottleneck.
    No point checking the diagonals or anything else.


    (Is this right? This is what I am doing, hope it is right!)
     
  17. travathian

    travathian Warlord

    Joined:
    Jan 15, 2003
    Messages:
    262
    By all means Mr Know it All, please code a new AI for us if it is so simple. Heck, just code me a game of tic-tac-toe and I'd be impressed.
     
  18. PPQ_Purple

    PPQ_Purple Techpriest Engineer

    Joined:
    Oct 11, 2008
    Messages:
    4,272
    That second thing I actualy did a while back. The first I am looking into, but with dificaulties becouse it's been a while since I worked with C++ and python.

    I am an acomplished C# programer. (been doing it for years, now going to colledge for it)

    The entire thing is not as hard as you think. With tic-tac-toe the idea is to first check if you have 2 in a row, if so win, else check if the oponent has 2 in a row, if so counter it, othervise check if you have take the position that eather causes you to get 2 in a row or stops the oponent from doing so.

    I did that a while back, I could try and dig it up for you if you realy want.
     
  19. Thonnas

    Thonnas Warlord

    Joined:
    Apr 5, 2006
    Messages:
    264
    At first I thought this was right, too, and would mean only 8 checks, but it is possible to have a diagonal choke point that doesnt follow this. Example:
    xxxx
    ooxx
    xxoo
    xxxx

    This is a lot more difficult to evaluate, especially considering it could just as easily be:
    xxxx
    ooxx
    oxoo
    oooo

    At which point, simple qualifications might make the first spot a potential choke point. (This is kind of a problem with the original proposal as well.)

    There needs to be something tangible beyond the choke point, for it to have actual value, and that is something the AI may never understand (at least in this game).

    Circle gets the square...
     
  20. sputnik323

    sputnik323 Magelord

    Joined:
    Sep 27, 2008
    Messages:
    394
    Fort discussions always seem to go on and on in the FFH threads. Orbi modmod has really fleshed out forts to be awesome and the AI can use them somewhat effectively. - are there times when there are too many forts in Orbi? yes but: the civ still gets the resource from them - the civ still get a :hammers: and :commerce: bonus from them - they cannot be built right next to each other - and the AI still will use the tile effectively putting units on the tile for defense and healing and get a ranged attack.

    In a game I'm still playing, a nearby civ built a fort (on top of a valuable resource) by my border because I was a threat to them. One I was drawn into a war with another civ (or because they finally got the right tech), they pillaged it and built the proper building. Before the pillage, they still got the resource (once it upgraded from fort to keep) and had a good defense for their city. Now it wasn't exactly the smartest placement, but the AI does many other stupid things... and this was at least partially effective where vanilla FFH forts would have been a total loss for the AI.

    FFH should just put in orbi forts and the problem is solved.
     

Share This Page