![]() Note to everyone: x + 1 / y is not the same as (x + 1) / y. I reintroduced a bug in my new code that I’d already fixed in my old code. I went and made my own housing table based on the best case from the three-lots-of-eight scenario, and the optimiser can’t seem to beat it. The problem is, the optimiser doesn’t seem to be doing a good job of optimising this scenario. (Sometimes, but rarely, a biome ends up with just one person… which is still workable if you put a pet with them.)įirst, the obvious: this does reduce costs further than having ‘households’ of three. That’s fine, because pylon range is longer than the 25-tile three’s-a-crowd range. As a result, sometimes biomes end up with only two people, in separate houses. To do this, I added eight dummy NPCs and split the resulting list of 32 into sixteen pairs, two per biome. So I went and made a new version that (as described) allows up to two ‘households’ of two NPCs per biome. (Which sounds awfully callous now that I put it like that…) I’d love to have some feedback from the community as to which NPCs you think should be prioritised! A more nuanced version would weight each NPC according to how beneficial their happiness is. You may have noticed that I tried to make every NPC happy, without taking into account things like the Goblin Tinkerer being a huge money sink, while the Guide (as far as I can tell) has no benefits or penalties from happiness whatsoever. One thing to do is to keep running the search, looking for even better arrangements than what I’ve got so far. (I’m happy to share the code if anyone’s interested.) Future Directions Preferences and housing assignments were represented using matrices, so that I could use Numpy to do the scoring faster. (Essentially, I’m minimising the geometric mean, not the arithmetic mean.) Everything was programmed in Python. I defined ‘optimal’ in this case as the lowest total percentage happiness modifier across all NPCs, calculated by multiplying the modifiers from the wiki together. It doesn’t guarantee that the solution is the best possible, but it’s done a pretty good job, as far as I can tell. So I went and taught myself simulated annealing, a method of searching for optimal solutions in reasonable amounts of time. Even if I could check each one in a nanosecond, it’d take a year and a half to check them all. Given those conditions, we’ve narrowed down the number of arrangements to ‘only’ 46 million billion for the first case (three to a biome). That’s less an assumption and more a requirement, although for all I know there are ways and means to get him to live elsewhere. The Truffle has to go in the Mushroom biome. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |