BenLubar / df-ai

Dwarf Fortress + Artificial Intelligence
https://benlubar.github.io/df-ai/
zlib License
245 stars 26 forks source link

Military squads aren't being refilled? #55

Closed mattregul closed 5 years ago

mattregul commented 5 years ago

Describe the bug Just noticed in my current game of 39 years, with 231 citizens, has pretty much no military presents.

What happened DF-AI isn't refilling squads?

Expected behavior With a population of 239 (120 candidates), I was expecting several full squads of dwarven killing machines

Visual reference

Squads

image image

Citizen Summary

image

Citizens - Page 1

image

Citizens - Page 2

image

Citizens - Page 3

image

Citizens - Page 4

image

Citizens - Page 5

image

Weapons

image

Armor

image

ai version:


Dwarf Fortress 0.44.12
  Windows 64-bit
df-ai 0.44.12-r1-update1-5-g9c2c4a64 (Build ID: df-ai-pre-0.44.12-r1-180801001)
  code 9c2c4a648f508366ca0d49f5445c5fbb5f9503f3
DFHack 0.44.12-r1-0-gc2a64b35 (Build ID: df-ai-pre-0.44.12-r1-180801001)
  library c2a64b3573abbee549761f5c1c2626eec7a6e81c
  structures 23500e4e9bd1885365d0a2ef1746c321c1dd5094```
BenLubar commented 5 years ago

The only thing I can think of is that the code to ensure there are enough axes and picks is being too aggressive. How many non-forbidden axes/pickaxes are there in the fort?

mattregul commented 5 years ago
mattregul commented 5 years ago

I'm actually fairly new to the game, I've been wanting to try it for years but never picked it up. Your AI is what got me to finally download the game. I figured I'll let the AI do its thing and learn the game as we go... So, hopefully the above info is what you needed

BenLubar commented 5 years ago

Basically, the AI won't add anyone else to the military because it's worried about the military having all the axes/picks and none being left to actually gather materials.

I'm unsure of how to handle this. Maybe force new squad members to be ranged when this happens, since there aren't any ranged axes or picks?

mattregul commented 5 years ago

Hmm, perhaps I'm out of resources, as my dwarfs aren't really digging anymore. Perhaps we need to stripmine until we have X-amount of resources in stock?

mattregul commented 5 years ago

No resources, no new picks

mattregul commented 5 years ago

Is the AI unable to filter melee weapons? Meaning, if there are swords, maces, etc... why won't the military use them?

BenLubar commented 5 years ago

The AI used to assign each squad's weapons individually, but it did that at squad creation, not when assigning new members to the squad.

Maybe it would be a good idea to keep allowing squads to have any weapon, but if a Dig or ChopTree job isn't able to be filled, whoever is holding the tool would be manually assigned a different weapon.

mattregul commented 5 years ago

🥇Nice, loaded up the same save, ai immediately created 11 squads, 105 soldiers!

mattregul commented 5 years ago

Going to start another world, but I'm seeing most of the squads are just wrestlers.

BenLubar commented 5 years ago

If their highest weapon skill is lower than their wrestling skill, they show up as wrestlers. If you have a lot of them, that's probably because there aren't any weapons for them to train with.