Smarter Orcs (a FfH II mod)

I forgot about that. But I think he made some improvements, don't remember what the difference is though.
 
Gandalf51:

Somehow the visibility on the tile in question became negative. I'm going to try disallowing negative visibility, which means that if that unit steps on and off, it should be able to see fine again.

Somehow your cities got -1 Copper resource as a base, which meant that your cities needed 2 Copper resources for 1 to register. I have no idea how, but much like visibility, I can think of no valid reason to have a negative number for the number of a resource in a city. I'm going to disallow changing to a negative number, which means that to rectify the last save you sent me, all copper resources would need to be removed (by Pillage, build, or Map editor) and then the desired number re-added.
 
Version 0.06 is released. It should not break save games (on 0.05) Note that it still is for FfH II 0.22h.

Note that this is mostly a couple patches for problems revealed by gandalf51's testing. If you aren't experiencing these problems, you might not want to bother with this version.
 
Version 0.06 is released. It should not break save games (on 0.05) Note that it still is for FfH II 0.22h.

Note that this is mostly a couple patches for problems revealed by gandalf51's testing. If you aren't experiencing these problems, you might not want to bother with this version.

The visibility bug is corrected but not the ressources bug.

I've made a new game and added ressources/tech/workers with the worldbuilder to test. Iron, mithril and incense are still not working.

Am I the only one to have these bugs with ressources ?
 
The visibility bug is corrected but not the ressources bug.

I've made a new game and added ressources/tech/workers with the worldbuilder to test. Iron, mithril and incense are still not working.

Am I the only one to have these bugs with ressources ?

I am puzzled, then- this means either one of two things:
1) The array that's holding resources/city is being overwritten by another variable (likely another array).
2) The number of resources/city isn't incrementing in the first place.

I'll have to look into this more.
 
I am puzzled, then- this means either one of two things:
1) The array that's holding resources/city is being overwritten by another variable (likely another array).
2) The number of resources/city isn't incrementing in the first place.

I'll have to look into this more.

I'm noting a defect in the Sailing Technology- when it tries to merge the resources along a river with the resources already connected to the cities, it both overcounts and undercounts certain resources. I was able to obtain 2 Incense resources from a single plot.

Since the saved game that you gave me with this defect doesn't have the Sailing Technology, I'm guessing that the Tech isn't the direct culprit. I'm guessing that it's the initial river.

At least in both your saved game and my attempt, all resources with any problem were along the initial river. One reason that there's virtually always an initial river in Smarter Orcs is that the BetterAI code goes out of its way to create one.

So my present guess is that that initial river isn't altering its plot groups correctly. That would result in both undercounting of, and double-counting of resources. There would be two ways to fix this:
1) Fix the code that creates the initial river so that it sets up plot groups correctly.
2) Maintain a more complex structure than a count for resources, so that all resources can be counted exactly one time.

The first solution is faster and more space-efficient, so I'll likely try that one first.
 
......

At least in both your saved game and my attempt, all resources with any problem were along the initial river. One reason that there's virtually always an initial river in Smarter Orcs is that the BetterAI code goes out of its way to create one.

So my present guess is that that initial river isn't altering its plot groups correctly.
.............

I've tried resources in square without river, sea or lake nearby and it still does'nt work with incense, iron and mithril
 
I've tried resources in square without river, sea or lake nearby and it still does'nt work with incense, iron and mithril

Yeah; I hadn't posted it, but when I tried an internal version with a plot group re-calculation after the initial river creation, that didn't help. I'm going to have to delve further into the plot group code.
 
Yeah; I hadn't posted it, but when I tried an internal version with a plot group re-calculation after the initial river creation, that didn't help. I'm going to have to delve further into the plot group code.

Why not use the plot group code not modified (with .22) ?
And I don't see the link with AI improvments
 
Why not use the plot group code not modified (with .22) ?
And I don't see the link with AI improvments

The problem is that there have been no changes to the plot group code since vanilla; presumably, there's a problem with something that's calling that code.

Nope; I don't see it either. I probably will once I finish debugging it.
 
Again, this is for 0.22h. This should fix the city resource issue.

To answer gandalf51's question, the defect didn't seem to have anything directly to do with improving AI. I'd guess that the BetterAI project thought they were fixing a defect, and injected one instead. I can understand why; the resource allocation code is an absolute mess.
 
Just posting to indicate interest and to bump the thread. After this weekend I'll be sure to drop off a save or three. Keep up the awesome progress!

Oh, and out of curiosity, have you figured out why the AI can't understand magic?
 
Just posting to indicate interest and to bump the thread. After this weekend I'll be sure to drop off a save or three. Keep up the awesome progress!

Oh, and out of curiosity, have you figured out why the AI can't understand magic?
Yes. However, working on it so that it will understand magic at least as well as a bad human player will be a multi-month task. At the moment, I'm focusing on fundamentals that will be necessary to support the ability for a reasonable magical setup, so that improvements on unit AI to use spells better will actually have significant value. To put it another way, if the AI can't cast the spells due to poor choices in resources, buildings, technology, promotions, or units, knowing how to cast them has very little value. By itself, this looks like it will take a couple months.
 
Note that this is still for FfH II 0.22h; I plan to do the 0.23c merge in the next release or two.

There are several changes:

Python speedup: the main hash table has been duplicated over in the python code (as a dictionary). This reduces the size of the call stack each time this is accessed; it seems to have a substantial speedup effect.
Lifespark change: With the present code, multiple Lifesparks won't sacrifice themselves in a single combat round. Now they will, if needed to keep the defender alive.
Lifespark/Stoneskin odds fixes: the effects of Lifesparks and Stoneskin will now show up in Combat odds, and the AI will now account for them in its estimation of the combat odds. It will also consider the Stoneskin promotion when trying to choose to build a defensive unit.
Combat Odds changes: Barring a defect, you shouldn't notice any change here. however, I've created XML hooks for a number of combat-related items, which should allow substantially different max HP, or different combat damage, or allow fractional damage to accumulate properly during combat, as three examples. These changes were inspired by this thread.
 
I am really amazed byt what you do and how creative your way is to approach it (i am referring to the poll in the strategy forum).
I hope you make sure to stay in close contact with Kael and Talchas, to make sure some of your effort can be saved into FfH Shadow and that you make most use of the improved BtS AI, without doubling your work... but in a way its already great to see a better AI mod for Fire!!!
Keep up the valuable work :goodjob:
 
I am really amazed byt what you do and how creative your way is to approach it (i am referring to the poll in the strategy forum).
Thank you. As you may be aware, the canonical way to develop expert systems is by interviewing a single expert. While I thought I probably could do that, I figured I'd take a shot at doing it through a quiz on the boards. Quite frankly, I was blown away by the quality, and number of responses I received on the first quiz. I got far more material than I could use at first; probably 20% of it needs to be saved for later use. Frankly, I think I got better information than if I'd interviewed a single expert, although it does require me to be more of an expert (both the construct the quiz, and the interpret the answers).
I hope you make sure to stay in close contact with Kael and Talchas, to make sure some of your effort can be saved into FfH Shadow and that you make most use of the improved BtS AI, without doubling your work... but in a way its already great to see a better AI mod for Fire!!!
Keep up the valuable work :goodjob:
One of the hopes of this mod is that it develops some things worth stealing into the main mod :) . Although I haven't even looked at BtS yet, I strongly suspect that many of the main BetterAI features are in there.

In any case, this is as good a place as any to mention that Smarter Orcs will likely stay with Vanilla-based FfH II for a while after the main BtS release (i.e. likely 0.23c, once I perform that merge). Eventually it will move to BtS, but I'm not planning to make that a high priority in the near future.
 
In any case, this is as good a place as any to mention that Smarter Orcs will likely stay with Vanilla-based FfH II for a while after the main BtS release (i.e. likely 0.23c, once I perform that merge). Eventually it will move to BtS, but I'm not planning to make that a high priority in the near future.

Too bad. Because I don't see the point in playing against dumb AI, so that mean's I will not play FfH II BtS before a while.
 
Who knows how the AI will perform in 0.3x; always hope for the best ;) (I'll stay with SmarterOrcs for the combat changes alone--and also, uhm, because I technically work on it as well ;P) (hey, I added like one Python function the other day! I'm not one hundred percent useless!)
 
Back
Top Bottom