increpare / increpare/PuzzleScript

optimisation: can deduplicate rules resulted by object multiple property expansion in same cell

Open
#737 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
1.1k
Forks
185
PR merge metrics
No merged PRs in 30d

Description

right [ player_or_target  player_or_target2 ] -> [ player_or_target player_or_target2 ]

expands to

(83) DOWN [ player target ] -> [ player target ]
(83) DOWN [ target player ] -> [ target player ]

https://www.puzzlescript.net/play.html?p=1de394c03a7bb77744e43de3deb9fe63

but these rules are actually the same. If you normalized the order of entities in each cell you could deal with detecting equivalent rules.

However, first thing to do is probably to write something to detect this and see if it happens at all in the test suite, and to what extent. I feel it's probably pretty rare and maybe not worth dealing with.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the object multiple-property expansion logic and the existing test suite. Measure whether equivalent expanded rules occur in the tests, then define completion as detecting or deduplicating the demonstrated equivalent rules without changing other rule behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers, game-dev
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.