Many AI issues in r849: what sort of info would help the most?

I think I’m seeing some regression bugs - the AI was definitely improving over the last few builds, but previously-solved issues are recurring with regularity.

No mods, removed all templates from the building folder (just to be safe, i think I had some ancient old-builder plans in there), started a clean game: consistent behaviour seen is -

  • Buildings aren’t completed about half the time now. Remaining items to be placed are constructed and in stock, but the Hearthlings never go place them. These are with custom, new, saved templates in the new builder, but nothing fancy: all using level 1 or 2 crafted items.

  • Related, is the 'lings stand around confused far more often than I’ve seen them do in ages. Notably, some of them are vibrating / quivering in place, stuck in short loops or oscillating indecision (i get that feeling myself sometimes…). I’ve seen literally the whole town standing still taking no action when phantom items need placement and the objects to place are available in storage.

  • Related to THAT, templates are dropping pieces. For instance, one never-completing house has a table with two chairs. A table and one chair are placed; the second chair is in the stockpile; hearthlings are idle; but in the normal view, the phantom chair “pending placement” placeholder is not present.

There’s a few other minor things but those are the major blockers. What can I do to get you technical data about all that? I’m attaching my most recent save; the two templates in it were created in this savegame. One completed, the other has not and is showing that missing-phantom behaviour.

Also lots of vibrating hearthling statues.
1527727019254.7z (3.0 MB)

@spacefiddle for the first case try to check if there is any wall furniture that is trying to be placed.
if there is one try adding a new ladder at the side and not at the front of the ghost item.
i remember sometimes a decoration would never be placed because of this
(it was some weeks ago but after that i never placed wall decoratios again… i was busy with modding)
the other 2 i never saw something like that

Aha, I do remember one of the blockers was a curtain - the phantom placeholder was there, but it never got placed. The entire building was just overgrown with scaffolding; I did wonder if it could be getting in the way. I don’t think it’s the only cause, but you’ve definitely identified one of them.

I think the issues are really because they’ve introduced new features recently. In introducing new features they need to refactor existing code, insert new code, shuffle game systems around to get things talking nicely, so the AI is bound to take a bit of a hit, being the most complex part of the game to develop and maintain. I get a sense that developing AI is a bit of trial and error as well, so they may try out new ways of doing things from time to time and ultimately introduce unforseen bugs as a consequence. This is especially so when they try and simplify code and processes to reduce the resource load on your PC, and thus allowing you to have more hearthlings!

As for your buildings not completing, I did have an issue last night whereby I had a weaver’s sign holding up a build. For some reason the AI had determined that the sign was to be placed before the walls were finished and before the roof went up, and because my weaver didn’t yet have his craft stations (as they were included in part of the build) and because thread hadn’t been crafted for the sign, he couldn’t build it. This meant building completely stopped until I realised what the problem was and manually rejigged things so the sign could be crafted.

I wouldn’t say this is a bug, but it’s obviously a symptom of a human needing to have thought about this particular scenario and coded it so the AI would follow this same train of thought and avoid this issue occurring, or making it so the carpenter crafted the weaver’s sign simply from wood, etc. Inherent are the complexities of coding AI. I’m sure these will be the kinds of things that get polished later on.

Is this from your savefile?:

In your savefile I only noticed this issue:

If I tell to craft a new wide window, they finish the building. This is a known bug that has been around for long, but we still haven’t figured out why does it happen. If you still see other cases where they stop building when they have everything available and reachable, please upload the savefile so that devs can take a look at it. (Don’t check your inventory, check your storages, btw, since this bug will still show them as being available for placement but they don’t really exist in the world).

About this:

It should be already fixed since r849.

Aha. This may be what happened, then: I checked inventory and saw a wide window, but in the new Builder view, the parts list showed 0/1. Looks like the parts list is an accurate source to check, then? I’m curious as to why the Carpenter didn’t crank out a new one if the template “knew” one was missing.

The building editor will only order to craft the items once. It can’t know that another bug happened that made one of the already crafted items disappear :sweat_smile: