>You have 27 inventory slots, 9 hotbar slots, 4 armor slots, 4 temporary crafting slots, 1 offhand slot, and 1 temporary slot for the result of crafting.
There is also a slot for your cursor. When your inventory is open you can click on an item to put it in your cursor slot and it will allow you to pick up an additional item.
I get that the author wanted to explore constraint solvers, but why can't you use a greedy algorithm for this problem? Sort the inventory slots by how much bundle space they consume, and insert the cheapest slots. The only way I see this failing is with multiple bundles, but in practice in Minecraft (which is admittedly not really part of the constraint problem) bundles only help when you have many distinct items but a large number of items occur only a few items. In that case it isn't hard to find combinations that fill each bundle completely by only inserting all of a given item (as opposed to inserting only part of an inventory slot) since many items will have only 1 or 2 copies.
I opt for the greedy strategy in most game play scenarios for pretty much the reasons you described here. I was considering making a mod to perform this action for me and was looking for a more "correct" solution but greedy is way simpler and just as effective for most cases.
Neat idea, though I didn't fully understand the details since I'm not experienced in constraint solvers. Might have to look into it.
Games often lead to interesting computational problems. Another example - I was designing a solver for Flow [0] which made me think about graph problems and applications in e.g. circuit board wire routing. Intuitively it's easy, but translating that into logic is more challenging.
Back in uni, we had to design a MIP program to solve flow, it was a nice and fun problem.
Turns out you can save a lot of time and effort by just cutting infeasible solutions out one by one, and resuming the solver, as opposed to writing some tricky constraints.
Another POV is, is any game made better by having serious constraint satisfaction problems hiding inside of it?
Before I get flamed for the question, another way of stating the question is, would Minecraft be made better if it didn’t limit the inventory size, or if the inventory limits were so simple as to not require any kind of constraint satisfaction, whether traditional (ie reading a wiki what to do) or programmatic?
I think it would be a worse game by quite a lot. Most of the "fun" moments in minecraft come from the stories of moving back and forth between your home and your mine for example. If there was no constraint the only thing stopping you from mining as much as you would ever need is your boredom.
charcircuit|4 months ago
There is also a slot for your cursor. When your inventory is open you can click on an item to put it in your cursor slot and it will allow you to pick up an additional item.
someguy101010|4 months ago
SOTGO|4 months ago
someguy101010|4 months ago
Liftyee|4 months ago
Games often lead to interesting computational problems. Another example - I was designing a solver for Flow [0] which made me think about graph problems and applications in e.g. circuit board wire routing. Intuitively it's easy, but translating that into logic is more challenging.
[0] https://en.wikipedia.org/wiki/Flow_Free
ViscountPenguin|4 months ago
Turns out you can save a lot of time and effort by just cutting infeasible solutions out one by one, and resuming the solver, as opposed to writing some tricky constraints.
doctorpangloss|4 months ago
Another POV is, is any game made better by having serious constraint satisfaction problems hiding inside of it?
Before I get flamed for the question, another way of stating the question is, would Minecraft be made better if it didn’t limit the inventory size, or if the inventory limits were so simple as to not require any kind of constraint satisfaction, whether traditional (ie reading a wiki what to do) or programmatic?
3eb7988a1663|4 months ago
[0] https://store.steampowered.com/app/1970580/Backpack_Hero/
mylesp|4 months ago
criteseneca11|4 months ago
Might optimise to run Minecraft servers on a WAN.
LAN should specify whether item selection is hostable.