The Farmer Was Replaced

The Farmer Was Replaced

owenz Jun 19, 2024 @ 7:42am
The Deal With Dinos?
What is the deal with dinos? Is there supposed to be some strategy that we are supposed to use other then, "plant" entire field, harvest?

My code


def get_bones(): start_val = num_items(Items.Bones) prune_val = 0 ws = get_world_size() for i in range(ws ** 2): x, y = one_d_two_d(i) create_dino(x, y) while measure() != prune_val: harvest() create_dino(x, y) harvest() quick_print("Bone Growth: ", num_items(Items.Bones) - start_val)


The above gets +2000 bones each run because of how it works. Which means this one loop defeats the leader board unlock in one go. Is that what it is supposed to do?
Last edited by owenz; Jun 19, 2024 @ 7:43am
< >
Showing 1-9 of 9 comments
Shaomada Jun 23, 2024 @ 12:50am 
I'm a bit confused about your question. The fun of many challenges is mostly optimizing efficiency. Have you measured how many bones you harvest per time, or how many bones you harvest per gold you spend? Personally my idea was to swap each kind of dino towards its own corner , but I'm not sure how this performs compared to other approaches.

If all you want to do is harvest x bones, at any cost, you can probably do a much simpler loop?

def harvest_bones(x): trade_item(Items.Egg, x) for i in range(x): use_item(Items.Egg) harvest()

Might produce slightly less than x bones if a dino runs away before you harvest.
owenz Jun 23, 2024 @ 6:08am 
Originally posted by Shaomada:
I'm a bit confused about your question. The fun of many challenges is mostly optimizing efficiency. Have you measured how many bones you harvest per time, or how many bones you harvest per gold you spend? Personally my idea was to swap each kind of dino towards its own corner , but I'm not sure how this performs compared to other approaches.

If all you want to do is harvest x bones, at any cost, you can probably do a much simpler loop?

...

Basically, the "best" approach should be the one I mentioned as it is already maximizing the space to a single type of dino and the only time it would not be able to do so is if the drone's upgrades were not maximized.

This
Harvesting a Dinosaur will also harvest all adjacent Dinosaurs of the same type, so an entire connected group of Dinosaurs will be harvested at once. ... The number of bones you get depends on the size of the group of dinosaurs you harvest. Harvesting groups up to 4 will drop bones equal to the square of the group size. Groups of size 4 or larger drop bones equal to 4 times the group size. Thus, the number of bones per Dinosaur increases with group size up to size 4, and then remains constant. For optimal efficiency, you always want to harvest groups of size 4 or larger.
already shows that you want to make each space 1 dino type and then harvest which the aforementioned code does.

There is no strategy other than just replanting, no need to do anything complex. It feels like a let down after the sunflowers/mazes/cacti problems. So I am just wondering if I am missing something here.

Also, the whole field is 1 dino type thus 100 * 4 * 3 = 1200 and as I am getting ~2100 each run that is ~900 replants to do so. Finally, it only take ~13 secs so I am getting ~161 per sec.
xC0DEB10C Jun 23, 2024 @ 2:38pm 
I've gotten to this stage now and have a couple ideas to play with and benchmark besides just place and harvest. I'll post them here when I'm ready and we can go through them and think about better methods all together (if there are any).

I also can't think of anything in traditional programming algorithms that is meant for a situation like this, so my guess is that this Dino Challenge is actually something random and up to us the community to come up with solutions. Which is a fun challenge in it's self for all of us.

So far special behavior I've noticed that may be useful is that the Dinos only swap with themselves or empty spaces, so a simple Grass could be used as a barrier.
Last edited by xC0DEB10C; Jun 23, 2024 @ 2:52pm
EinWesen Jun 24, 2024 @ 12:44pm 
i thought about a "fence" too. But that would at least also get in your way when you want to swap them in...
xC0DEB10C Jun 24, 2024 @ 6:42pm 
I benchmarked some different variations like pre-tilling or not, so basically letting the grass grow under a Dino after harvesting or not and placing a new Dino after harvesting or not.

Out of those variations pre-tilling and placing a new Dino after harvesting gives around ~18924 Bones/m and uses ~2200 Eggs/m. So that would be the base-line to beat.
Last edited by xC0DEB10C; Jun 25, 2024 @ 11:29pm
xC0DEB10C Jun 25, 2024 @ 10:54pm 
I tried forcing every Dino to be the same measure() type, so 1 for example. Basically only planting 1's and then harvesting the full farm. The average for that is around ~16782 Bones/m and uses ~3194 Eggs/m - so less bones and wastes more eggs.
Last edited by xC0DEB10C; Jun 25, 2024 @ 11:34pm
xC0DEB10C Jun 26, 2024 @ 6:25am 
Tested out another idea by only harvesting if there are 1, 2 or 3 adjacent with the same color/number (still with replacing the harvested one). The stats for this are:

3 Adjacent
~4806 Bones/m
~636 Eggs/m

2 Adjacent
~14586 Bones/m
~1772 Eggs/m

1 Adjacent
~15588 Bones/m
~2230 Eggs/m

So all 3 and the method itself gives less than just harvesting and replanting everything, which was ~18924 Bones/m.


I'm starting to think there might not be a better method than just harvesting and replanting... but I still have 1-2 ideas to try out like sorting into sections but still, I can't imagine it being worth it with the required swap's and movement iterations.
Last edited by xC0DEB10C; Jun 26, 2024 @ 6:29am
xC0DEB10C Jun 26, 2024 @ 8:31pm 
Incase nobody knew this (I didn't), you can measure() around the map, so if you are at (0, 0) and use measure(West), it will measure the Entity on the other side. So basically like the Dino description says that they connect to adjacent wrapping around.

You can't swap() wrapping around the map though, so only measure(). Maybe we can do something with this as well.

Also did a test to see how many adjacent give:

[Adjacent count > Bones gained (+compared to last)]
10 > 120 (+12)
9 > 108 (+12)
8 > 96 (+12)
7 > 84 (+12)
6 > 72 (+12)
5 > 60 (+12)
4 > 48 (+21)
3 > 27 (+15)
2 > 12 (+9)
1 > 3 (+3)

So 4 adjacent would be the most efficient?
Last edited by xC0DEB10C; Jun 26, 2024 @ 9:05pm
xC0DEB10C Jun 26, 2024 @ 10:29pm 
This is my last test for now, going to move on to the Leaderboard. If I have a random idea in the future I'll test it and share here.

So I prepped the farm like a cross, 4 arms for each type and then spawned a Dino in the center and swapped them into their respective arm/direction. Once the arm was full I harvested.
I benchmarked this up to an arm length of 4 (due to not more space on 10x10).

These are the results for the arm lengths of 2-4:

arm_length = 4
~4149 Bones/m
~359 Eggs/m

arm_length = 3
~5184 Bones/m
~456 Eggs/m

arm_length = 2
~5508 Bones/m
~630 Eggs/m

Even if how I implemented it could be optimized more, there is no way it's reaching anything close to the base-line mentioned earlier. So sorting into 4-3-2 of a kind is a dead end.
< >
Showing 1-9 of 9 comments
Per page: 1530 50