Common sense AI

Started by Boba Phat, August 31, 2016, 10:44:42 PM

Previous topic - Next topic

Boba Phat

If you set a colonist to make food and there's no food in storage, they'll go out and cross the entire map to pick up a single handful of crops, cross all the way back, and cook one meal.  Then they'll repeat it all over again.  It's especially glaring and irritating when you're playing on an extreme desert map where your crops are spread over Hell's half acre.  It also happens when, for example, you've blueprinted a carpet and don't have enough cloth in storage.  The colonist will go out to the cotton fields, grab ONE of the harvested cloth lying around, go and lay ONE square of carpet, then repeat -- even if it takes half a day to get to the cotton field and back.  It's so extreme that I often find everything lying on the ground rotting because there's no one to haul it -- because all their time is taken up doing everything else with total inefficiency.

I've tried assigning people to do nothing except haul, but given that at least one or two colonists won't do dumb labour, the only way to reserve people for hauling is to allow other important tasks like building and cooking not to get done.  Animals with sufficient training are the obvious solution, of course, and once you do that the game becomes effortless -- but to get the animals trained means spending years of game time with your crops rotting all over the ground while you do your animal handling.

Cleaning has a similar problem.  I've watched colonists assigned to clean zig-zagging across the entire settlement from one end to the other, cleaning one or two spots in each place.  Or, worse yet, they'll clean a whole warehouse which gets lots of traffic and every time they try to leave, someone tracks a spot into it and they cleaner pops back inside to clean it, over and over again, while the filth on the other side of the colony piles up.

Colonists need some common sense; even if construction has higher priority, for example, they should grab an armload of supplies lying on the ground if their path takes them near a storage depot.  And if they're building 100x of something, they shouldn't grab just one 1x worth of supplies at a time.

It's annoying on regular maps, but in maps with few arable spots spread out widely it becomes completely unbearable.

MeowRailroad

Quote from: Tynan on December 02, 2016, 05:24:06 PM
This is like being in a remote fishing town in Libera and asking, "Why can't I just pay one of the fishermen $10 to take me back to Los Angeles?"

giannikampa

on the cooking issue: you can restrict the range of ingredients in the cooking bills AND have a stockpile in that range. This way not a single colonist can cook because no ingredients are in range so he(they)'ll go for next job that eventually is hauling that far away food to the stockpile. He will haul more as an hauling job instead of cooking one. As soon as ingredients are in range the cooking will be performed
This goes faster and smoother the more colonist you have.
And as always.. sorry for my bad english

ThiIsMe007

#3
I think the non-combat AI is very good in Rimworld, once you understand how it works.

Most of my cleaning issues were cured by the No cleaning please. Without it, colonists will only clean whatever is in your "Home" area.

QuoteIf you set a colonist to make food and there's no food in storage, they'll go out and cross the entire map to pick up a single handful of crops, cross all the way back, and cook one meal.

The AI tends to do this indeed. My explanation is that it tries to avoid resources spoiling, which is why it gets those that are farthest away first. I believe you can change this behaviour in the cooking bill, by reducing the distance (radius=999, by default) from which the cook is supposed to fetch the ingredients, and make it so that resources are readily available to them closer by (because your haulers could do their job).

QuoteIt also happens when, for example, you've blueprinted a carpet and don't have enough cloth in storage.  The colonist will go out to the cotton fields, grab ONE of the harvested cloth lying around, go and lay ONE square of carpet, then repeat

I agree, but this again can be solved by reducing the distance from which to pick up stuff, and to have more of your haulers do their job.

One of the issues I identified in my early games was that I gave my colonists just too many tasks to achieve at the same time. They would never finish any of them, which got problematic quick : no hauling, no cleaning, with constructions left half-finished all over the map. In my recent game, I learned to place blueprints for constructions, and immediately disable them. I would only enable them back if that was the priority of the day. Otherwise, cleaning is high-priority to most of my colonists, and so is hauling for some of them.

Another thing to keep in mind is that the AI has colonists build stuff collaboratively, so that all of them get experience in as varied skills as possible. The side effect is that one of your colonists can be building the first section of a wall, without finishing the second one, because another colonists is jogging from across the map to do so and avoid skill decay. That's at least how I interpret this.

Fairly annoying side-effect I grant you that, but it can be minimized if you can avoid your builders also having to do the cooking, cleaning, animal taming, doctoring, harvesting and hauling elsewhere while they're building, because your colonists are over-assigned in tasks.

QuoteIt's so extreme that I often find everything lying on the ground rotting because there's no one to haul it -- because all their time is taken up doing everything else with total inefficiency.

That isn't an issue of the game, that's an issue of the player playing the game, if you don't mind my feedback. In ancient times, there used to be harvesting times dedicated to only that. Whole villages would head out to help in the field. Family, distant cousins, uncles, despised stepmothers, elders, neighbours from other villages, children, the dogs and their fleas : everyone! It was just too crucial a time and a task to do anything else.

If you have large fields, to feed a large colony, how can you expect 2 or 3 of your people to achieve better than reality/history ?

QuoteI've tried assigning people to do nothing except haul, but given that at least one or two colonists won't do dumb labour, the only way to reserve people for hauling is to allow other important tasks like building and cooking not to get done.

Prioritize. Trust me, it works in Rimworld too, and it's beautiful when you see it with your own eyes.

QuoteAnd if they're building 100x of something, they shouldn't grab just one 1x worth of supplies at a time.

That's something I can agree with.

I continue to see colonists pulling a very small number of resources from a storage area, from a pile with a small number of resources, when they could have taken resources from another pile in the same storage area, to haul the maximum charge that they are able to (75 usually).

I think this needs to be tweaked, since players can't change this behavior, except by micro-managing their colonists each time they're out to build something.

Boba Phat

Quote from: ThiIsMe007 on September 01, 2016, 03:41:27 PM
Fairly annoying side-effect I grant you that, but it can be minimized if you can avoid your builders also having to do the cooking, cleaning, animal taming, doctoring, harvesting and hauling elsewhere while they're building, because your colonists are over-assigned in tasks.

Part of the problem for me is that I don't like large colonies, and I don't have enough colonists to specialize.  Instead of having a cleaner, what I want is for everyone to spend a small part of their day doing a bit of cleaning.  Same thing with food.  Instead of cooking large numbers of meals (and watching them spoil before I get refrigeration up and running) I'd rather each colonist cook a meal when they get up and eat it.  I could live with 25% of each colonist's day being taken up with basic maintenance (replanting flower pots, sweeping, cooking meals, feeding the prisoner, refilling the stove, and so on) and leaving them free to do their main job the rest of the day.  Trying to get them to do this now requires excruciating micromanagement.

AlcoholV