Will the AI be worked in future versions?

I would love it if the people who are doing AI would focus their efforts. AI which we write in FF won't often be able to be ported out to base FfH too easily, but it is an area I am paying far more attention to of late.

I would have one request though if you 3 AI people got together: Please don't hardcode the DLL. If you want a specific "IF X_item, then Y_action" keep that in Python and try to think of a way to convert it to "IF X_attributeOfItem then Y_actionValue enhancement" Nothing which is in the XML should ever appear in the DLL unless it is required to (Enums, Globals and Text). Using GlobalDefines to sort of "cheat" and still hardcode a decision or link of functions is fine, because at least then you can easily set up a "If this actually is defined and exists" check so that people who mod based on your work are able to change what the Define points at, or remove it completely without a crash.

I haven't looked at the source for any of your 3 mods yet (Better AI seems to have converted some spaces to tabs in a few files, which makes comparing to find changes a nuisance, and I just haven't gotten around to Wild Mana, but he posted evidence of Hardcoding in response to Opera and I lost most interest in looking at his work).


Hardcoding is a good way to get instant results, but it isn't quite as robust, causes issues for people who borrow your work, and prevents the AI from crunching the numbers and coming up with a strategy that is amazingly brilliant, but nothing a human would have decided to do himself (which is the one advantage a well written AI generally has in strategy games), plus it makes it require a rewrite any time you add a new feature or modify the relative worth of features which required choosing between. (ie - If I told the AI to always prefer building Warriors and then Upgrading them to something else, but months later I increased the upgrade costs across the board, so now that is actually a horrible idea. Now I have to go back and change the AI)
 
At the very least, we probably need a combined effort on a single AI modmod. As it currently stands, there's me, Sephi and Turinturambar who have all been working on our own changes independently. This seems like a wasted effort for the most part and is kind of demotivating for me, personally, since I feel like I'm reinventing the wheel if I make my own version of something someone else has already done and merging other people's changes is time-consuming and not very fun or interesting.

Hmm for me it's the opposite, I like having competing versions and coming up with better ideas/improving other's ideas or spotting flaws.
I think however that focusing on one aspect and documenting each function/call you change is probably the way to go. I can see how it would be frustrating to comb through all the .dll changes you and Sephi made and compare. A combined project has the drawback that you would probably spend more time coordinating and writing long posts justifying your decisions. I'd rather spend the time testing new ideas.

Hardcoding is a good way to get instant results, but it isn't quite as robust, causes issues for people who borrow your work, and prevents the AI from crunching the numbers and coming up with a strategy that is amazingly brilliant, but nothing a human would have decided to do himself (which is the one advantage a well written AI generally has in strategy games), plus it makes it require a rewrite any time you add a new feature or modify the relative worth of features which required choosing between. (ie - If I told the AI to always prefer building Warriors and then Upgrading them to something else, but months later I increased the upgrade costs across the board, so now that is actually a horrible idea. Now I have to go back and change the AI)

I disagree with a weighting system being superior to hardcoding some choices in python for a mod. In an ideal world with unlimited test time and unlimited game knowledge a weighting system would be superior.
However the main problem with a weight system is that it very quickly becomes too complicated, resulting in very odd results. I mean look at the choosebesttech function. Can you easily say what effect increasing a certain weighting or tweaking some xml parameter has on that function? I can't and apparently the FFH team can't either as currently the tech path is pretty much hardcoded for every leader due to the flavorweights and a few other factors dominating the calculation of the besttech value.

As for ease of adaption, some merging process would be necessary no matter what, unless you are willing to live with suboptimal results.
Same for substantial changing of features. Here I would even argue that hardcoding makes it easier to deal with changes. For example the AIs love to adopt Conquest, which is a really bad thing to do for any AI that relies on food, as it stifles their growth for only a very marginal production benefit. Here the civic weighting algorithm assigns a value to Conquest that is far too high. In my mod I just disable running conquest for non-fallow civs, so they have to run the other far superior civics in the category. If Conquest gets changed to be worthwile I could simply remove the block.
However if you were to change the weighting system in the dll, it would be a lot harder
to find a proper weighting scheme that would give the Civic the low value it deserves for AI civs. If the civic gets changed once more you would probably have to reevaluate the weighting system again.
 
Well, to state the obvious, I would love if Kael and the official team improved the AI. Although I haven't played the modmods yet, I think it is great that we have three talented modmoders who have all independently improved the AI - this should make the job of putting it into 'official' FfH easier.

Although it wasn't AI related, I don't think there is any doubt that Firaxis used the unofficial patch material and Bhruic's fixes to help in official patches.

Personally, I would rather play on noble/price against really good AI than immortal against the AI we have now.

Best wishes,

Breunor
 
So, yeah, I'm interested in a single AI project. I reckon there are probably quite a few other code-savvy people here who might be willing to try their hand at it if it didn't mean maintaining a modmod on their own.
Since you already made a very well written and popular AI mod you might want to ask an admin to create a Forum for your mod and then see if you can find people for this project, discuss goals, how to code and the like.
 
Back
Top Bottom