MarkosKon / hsdeckideas

A random deck generator for Hearthstone.
https://hsdeckideas.netlify.com
2 stars 1 forks source link

Algorithm improvement #7

Closed MarkosKon closed 5 years ago

MarkosKon commented 5 years ago

Instead of only trying to add cards in the tree format, at some point stop and analyze the existing deck and add cards that their priorities are already satisfied in a good percentage.

Do the opposite in other words of what we're doing with the tree and something similar of what we're doing with the archetype priorities.

In order to choose a card we may have to calculate a score that will result from the card rating, the percentage of the satisfied priorites and the total cards needed for that priority.

If that works well, we could even try to remove the archetype priorities from the algorithm or at least give the user a choice.

MarkosKon commented 5 years ago

572d60d45975fb68dd86d36cdde3c2e71fffac2e This commit delays the time we choose an archetype if we don't have priorities from 16 cards in to 24 cards in. This seems to work well because it creates more interesting trees.

MarkosKon commented 5 years ago

At some point (probably never), we may want to re-write the algorithm from scratch.

I'm thinking something with internal reducers (independent from the UI) and immutablejs. We could have the logic in the reducers or use something like redux-logic, if I understand correctly.