plancraft 0.3.26__py3-none-any.whl → 0.3.27__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.
@@ -5,6 +5,14 @@ from typing import Optional
5
5
  from pydantic import BaseModel, field_validator, model_validator
6
6
 
7
7
 
8
+ # [A1], [A2], [A3], [B1], [B2], [B3], [C1], [C2], [C3], [I1]-[I36]
9
+ SLOT_REGEX_PATTERN = r"\[([ABC][0-9]|I[1-9]|I[12][0-9]|I3[0-6])\]"
10
+ # [0], [A1], [A2], [A3], [B1], [B2], [B3], [C1], [C2], [C3], [I1]-[I36]
11
+ SLOT_REGEX_PATTERN_WITH_CRAFTING_SLOT = r"\[(0|[ABC][0-9]|I[1-9]|I[12][0-9]|I3[0-6])\]"
12
+ # 1-64
13
+ QUANTITY_REGEX_PATTERN = r"([1-9]|[1-5][0-9]|6[0-4])"
14
+
15
+
8
16
  def convert_to_slot_index(slot: str) -> int:
9
17
  slot = slot.strip()
10
18
  grid_map = {
@@ -223,9 +231,7 @@ class MoveActionHandler(ActionHandlerBase):
223
231
 
224
232
  @property
225
233
  def regex_pattern(self) -> str:
226
- return (
227
- r"move: from \[(0|[ABCI][0-9])\] to \[(0|[ABCI][0-9])\] with quantity \d+"
228
- )
234
+ return rf"move: from {SLOT_REGEX_PATTERN_WITH_CRAFTING_SLOT} to {SLOT_REGEX_PATTERN} with quantity {QUANTITY_REGEX_PATTERN}"
229
235
 
230
236
  @property
231
237
  def action_name(self) -> str:
@@ -263,9 +269,7 @@ class SmeltActionHandler(ActionHandlerBase):
263
269
 
264
270
  @property
265
271
  def regex_pattern(self) -> str:
266
- return (
267
- r"smelt: from \[(0|[ABCI][0-9])\] to \[(0|[ABCI][0-9])\] with quantity \d+"
268
- )
272
+ return rf"smelt: from {SLOT_REGEX_PATTERN} to {SLOT_REGEX_PATTERN} with quantity {QUANTITY_REGEX_PATTERN}"
269
273
 
270
274
  @property
271
275
  def action_name(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: plancraft
3
- Version: 0.3.26
3
+ Version: 0.3.27
4
4
  Summary: Plancraft: an evaluation dataset for planning with LLM agents
5
5
  License: MIT License
6
6
 
@@ -11,7 +11,7 @@ plancraft/data/val.json,sha256=IToAiaqUNQi_xhX1bzmInuskLaT7C2ryQjP-CZkzL24,13044
11
11
  plancraft/data/val.small.easy.json,sha256=9zEmqepjXG2NIp88xnFqOCkwsUsku3HEwHoQGxgTr6U,190252
12
12
  plancraft/data/val.small.json,sha256=76E9EFaljDQyAokg97e-IblvcOe6KbrdKkXvRxhhkgo,237653
13
13
  plancraft/environment/__init__.py,sha256=XFsFny4lH195AwAmL-WeCaF9ZCMgc7IgXIwhQ8FTdgE,505
14
- plancraft/environment/actions.py,sha256=9GESxqx4z0aTwEmI6H-8MJMaqnFTAgsfck7GOHUQEBg,11175
14
+ plancraft/environment/actions.py,sha256=fL_kzVUyOiud_74ST2YWhEgNFhL7y_ydwDPDmY1CTtU,11551
15
15
  plancraft/environment/env.py,sha256=A4532st7JFBYBF_Nh0CEEi3ZTLJAeaB3t9PAIVSemj0,16390
16
16
  plancraft/environment/items.py,sha256=Z9rhSyVDEoHF1pxRvhyiT94tyQJaWHi3wUHVcamz82o,221
17
17
  plancraft/environment/planner.py,sha256=uIOJjIoyT_4pxeWeTKb8BkLJyKZG0-AMoEOkZs6Ua9A,19340
@@ -1920,7 +1920,7 @@ plancraft/models/generators.py,sha256=F76_iPiqxUjDIrQwF58tzM0bLM91OkZJ0sBqBuki5w
1920
1920
  plancraft/models/oracle.py,sha256=f-0KWlBuHy6wcxmDsxM3MQ_QwfBstzfbA26mlk1MgLA,1657
1921
1921
  plancraft/models/utils.py,sha256=E-sZohvolWgGbpHQKgAgkgIfUJoVnT5pMt6JP8xLHKg,4034
1922
1922
  plancraft/train/dataset.py,sha256=oFqEd4LG9oEQ-71teh0Wf7-jJbtybT2ZibfM2bBdBkM,5474
1923
- plancraft-0.3.26.dist-info/METADATA,sha256=2s3S8xZMyP8v1T0y2qHl5OHIN18sMn0UXXA8iJxUQq8,11148
1924
- plancraft-0.3.26.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
- plancraft-0.3.26.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
- plancraft-0.3.26.dist-info/RECORD,,
1923
+ plancraft-0.3.27.dist-info/METADATA,sha256=fii20vfc62_UjIquU8OXEWtxRXfaaaA2lRo7EbFaQok,11148
1924
+ plancraft-0.3.27.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
1925
+ plancraft-0.3.27.dist-info/licenses/LICENSE,sha256=YGR8ehDB4t-T-lOQKMfKNR-2zsOU7E3E5NA8t25HKE0,1070
1926
+ plancraft-0.3.27.dist-info/RECORD,,