plancraft 0.4.8__py3-none-any.whl → 0.4.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- plancraft/environment/planner.py +6 -1
- {plancraft-0.4.8.dist-info → plancraft-0.4.9.dist-info}/METADATA +1 -1
- {plancraft-0.4.8.dist-info → plancraft-0.4.9.dist-info}/RECORD +5 -5
- {plancraft-0.4.8.dist-info → plancraft-0.4.9.dist-info}/WHEEL +0 -0
- {plancraft-0.4.8.dist-info → plancraft-0.4.9.dist-info}/licenses/LICENSE +0 -0
plancraft/environment/planner.py
CHANGED
@@ -520,6 +520,7 @@ def get_subplans(
|
|
520
520
|
# move all the current stuff in the crafting grid to free inventory slots
|
521
521
|
# While this makes a worse planner, this makes a clearer distinction between crafting steps
|
522
522
|
subplan = []
|
523
|
+
action_items = []
|
523
524
|
for slot in range(1, 10): # crafting grid slots 1-9
|
524
525
|
if slot in current_inventory and current_inventory[slot]["quantity"] > 0:
|
525
526
|
free_slot = find_free_inventory_slot(current_inventory, from_slot=slot)
|
@@ -529,6 +530,7 @@ def get_subplans(
|
|
529
530
|
quantity=current_inventory[slot]["quantity"],
|
530
531
|
)
|
531
532
|
subplan.append(str(action))
|
533
|
+
action_items.append(current_inventory[slot]["type"])
|
532
534
|
current_inventory = update_inventory(
|
533
535
|
current_inventory,
|
534
536
|
slot,
|
@@ -537,7 +539,7 @@ def get_subplans(
|
|
537
539
|
)
|
538
540
|
if subplan: # only add clear subplan if there were items to clear
|
539
541
|
subplans.append(subplan)
|
540
|
-
action_items_used.append([])
|
542
|
+
action_items_used.append([action_items])
|
541
543
|
|
542
544
|
# Calculate the subplans for each step in the plan
|
543
545
|
for plan_recipe, new_inventory in plan:
|
@@ -554,6 +556,9 @@ def get_subplans(
|
|
554
556
|
plan_inventory_counter = copy.deepcopy(plan[0][1])
|
555
557
|
plan = [(clear_action, plan_inventory_counter)] + plan
|
556
558
|
|
559
|
+
# If we are returning items, we need to return the action items used
|
560
|
+
# this is a list of the item (from_slot) used in each action
|
557
561
|
if return_items:
|
558
562
|
return subplans, plan, action_items_used
|
563
|
+
|
559
564
|
return subplans, plan
|
@@ -18,7 +18,7 @@ plancraft/environment/__init__.py,sha256=XFsFny4lH195AwAmL-WeCaF9ZCMgc7IgXIwhQ8F
|
|
18
18
|
plancraft/environment/actions.py,sha256=bMHR8bmgE_DD10K4Bii_QRgTs-GPkcgw9NKwHDoDmyQ,11813
|
19
19
|
plancraft/environment/env.py,sha256=B7VpIMcQKITyDmkHgBoR4KbmxmM1b4A6Y-1_b90EMXo,16428
|
20
20
|
plancraft/environment/items.py,sha256=Z9rhSyVDEoHF1pxRvhyiT94tyQJaWHi3wUHVcamz82o,221
|
21
|
-
plancraft/environment/planner.py,sha256=
|
21
|
+
plancraft/environment/planner.py,sha256=TKOMMqdBtk0dSc8X-ZgMnFeQnG_gzp99i3PHP-WI_hE,22415
|
22
22
|
plancraft/environment/prompts.py,sha256=NU9YHAz3id-IgaukQvEi5uLlpEstpE5_Hccvvq1At2Y,6950
|
23
23
|
plancraft/environment/recipes.py,sha256=0vwzOU86eZmGN2EpZVSIvzxpx0AOBWNPxTtAOFBN2A0,19570
|
24
24
|
plancraft/environment/sampler.py,sha256=BworSMWQ-TLbV9068tkNOdo4ZLP-UDox6Laeb4Weu9k,7723
|
@@ -1924,7 +1924,7 @@ plancraft/models/generators.py,sha256=7COMLjjx_HbTWJqINNLqqExQv7gLikfLTViacAdSt5
|
|
1924
1924
|
plancraft/models/oracle.py,sha256=f-0KWlBuHy6wcxmDsxM3MQ_QwfBstzfbA26mlk1MgLA,1657
|
1925
1925
|
plancraft/models/utils.py,sha256=xgkP5jqCeFfkKe3Xd4ZYfTqiEJ-dA-qgFAC-J35ub3E,4029
|
1926
1926
|
plancraft/train/dataset.py,sha256=oFqEd4LG9oEQ-71teh0Wf7-jJbtybT2ZibfM2bBdBkM,5474
|
1927
|
-
plancraft-0.4.
|
1928
|
-
plancraft-0.4.
|
1929
|
-
plancraft-0.4.
|
1930
|
-
plancraft-0.4.
|
1927
|
+
plancraft-0.4.9.dist-info/METADATA,sha256=jS7Fsd8WyiqI9w7joE9onIe8QJ339Lvo7vAxi3ihV6s,12391
|
1928
|
+
plancraft-0.4.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
1929
|
+
plancraft-0.4.9.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
|
1930
|
+
plancraft-0.4.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|