The Farmer Was Replaced

The Farmer Was Replaced

Belenus May 19, 2024 @ 12:35am
Polyculture / get_companion
Firstly, I love this game! Introducing all the basic algorithms in computer science with different requirements for the plants is awesome. Nevertheless, I don't get the point of the polycultures. Are there any algorithms to use them efficiently on a whole field, which yields more outcome than planting a single-entity field and harvest it quickly?
< >
Showing 1-3 of 3 comments
Czech May 20, 2024 @ 8:13pm 
Yes. You want to move to a plot and plant the companion if any other plots ask for it, otherwise plant something random or needed. You need logic to handle cases like insufficient seeds or funds, as well as soil conditions. You want to keep track of all growing plots and harvest them if it is time-efficient enough to move to that plot and harvest/replant it. You also want to consider NOT harvesting a plot if it is randomly chosen as a companion of another plot after it was already planted. These are all of the simplest cases and they can be expanded upon to improve efficiency.

If you're asking if there is a general purpose algorithm that already does all this then I would think not; you have to code the solution yourself.

In most cases people are probably just going to use the brute-force method and ignore a lot of the edge cases that make this method of planting so efficient. It gives you 10x the resources, so you need to ensure that the algorithm you use is not more than 10x inefficient at performing the tasks compared to a brute-force method.
Last edited by Czech; May 20, 2024 @ 8:15pm
OneWomp May 20, 2024 @ 9:18pm 
For the point. Imagine you had a small plot of size 1 by 2. You could plant two carrots and get 2xcarrots or you could plant 1 carrot plus companion and get 10x carrots. Clearly polycolture has an advantage there.

On a real plot, say the largest 10x10, you could plant 100 carrots, wait for them all to grow and harvest them and get 100xcarrots. Or you could plant 10 carrots, and 10 companions, and get 100xcarrots plus whatever the companions were.

For the algorithm there's a lot to decide what is efficient / not.
Hazir May 21, 2024 @ 10:47am 
i chose to approach the polyculture tech for the sake of farming the 2-3 last upgrades that cost hay
i thought to myself, isn't taking several hours to automate something that i could just do twice in that timeline the whole idea behind automation?
it definitely is

i must admit, once polyculture was up and running it farmed hay blazingly fast
my approach was simple:
plant ONE entity, plant it's companion and immediately return to harvest it
i've worked on an algorithm to implement goto(x,y) with the shortest path possible from current position and from there it was flying.

the speed at which you harvest the single companioned entity is definitely faster than planting and harvesting 10 of them
i did not feel as though planting more than one entity with a companion was worth the added complexity, in essence every second that the original entity is not harvest is wasted efficiency
Last edited by Hazir; May 21, 2024 @ 10:51am
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: May 19, 2024 @ 12:35am
Posts: 3