hey
each item after action is reduced to other level items:
{:item1 [level-42 level-489 level-234 level- 423]
:item2 [level-9889 level-98]
:item3 [level-42 level-98 level-3]}
In other words each item is reduced to N different items.
I want to have on the end specific number of each reduced items:
{level-42 5389
level-423 345}
In other words this are final output items which I want to have after all reductions.
each item has a price:
{:item1 345
:item2 67}
I want to find the cheapest combination to get outputs from inputs.
Do you know any algorithm by name which I can use for that or I have to use AI to figure out it?
PS This is very hobby thing, but I prefer to use algorithm if exist to make it simpler.This sounds like a combinatorial optimization problem, so there well may be an algorithm already for solving it. I can't tell right away from your problem description, but you can look into different methods and problems they solve at e.g. https://en.wikipedia.org/wiki/Combinatorial_optimization
prices changing all the time, so algorithm or AI can’t assume the same price for next query for inputs->outputs. Also different number of inputs cost different, not predictable price. I simplified it above in map.
In reality it is
{:item1 [234 343 434 456 ...]
so there are orders to buy for each itemit already sounds too complex…. AI sounds like a good choice