Kazetsukai / onetech

Automated Crafting Guide for One Hour One Life
MIT License
31 stars 24 forks source link

Improve difficulty calculation #128

Open ryanb opened 5 years ago

ryanb commented 5 years ago

Currently the "difficulty" calculation is very rough. Here are some ideas to improve it.

ryanb commented 5 years ago

For item rarity, I. Can calculate the percent that item shows up across all biomes. This will likely be a very small number. I can then take the log10 of this to get a nice number to work with for the difficulty.

Combining items would just add their difficulty together. If a tool is used then only factor in the difficulty based on the % that tool is used up.

Timed transitions could add a slight amount depending on the length of time. Perhaps add 10 difficulty per hour?

I may need to add a constant difficulty for each transition too. Maybe a minimum value. We will see.

ryanb commented 5 years ago

To determine difficulty we need:

We can then calculate the difficulty by estimating the time it takes to find the natural objects, adding a constant (1 second?) for the transition count, and then adding the decay time.

I will need to play around with the decay time to see what amounts best represent difficulty. Something that sits for an hour is not necessarily difficult.

Determining the natural objects is the hardest part because we need to consider consumed and leftover objects from both sides when applying a transition.

This will allow us to see if the overlapping objects from one side were a consumed object on the other. In that case we can delete that objects natural objects and transition count.

The number of uses remaining also need to be tracked on leftover objects to determine if we have enough to satisfy the consumed object.

The decay time should be the max decay time from the two objects in the transition.

Some questions: