Skip to content

Conversation

@raj-open
Copy link
Owner

@raj-open raj-open commented Sep 7, 2025

Qualitatively improved the GS algorithm as follows:

  1. we separately keep track of the obstacle and the dithered obstactle, instead of computing this for every pair of pieces. This results in a linear time improvement.

  2. instead of the order in the depth-first tree search, we dynamallyically sort to prioritise placing pieces, for which the number of possibilities is the fewest. This results in a significant time improvement.

  3. we implemented parallelisation which allows us to efficiently determine all solution in a short amount of time.

In addition to this, the logging of solutions has improved for ease of readability.

Also by switching between the obstacle and the dithered, we avoid dupicate computations
… solution

NOTE: currently we just get 1 solution instead of all
Main mistake was use of e.g. `\x1b[92,1m` instead of `\x1b[92;1m`.
@raj-open raj-open marked this pull request as draft September 7, 2025 18:50
@raj-open raj-open marked this pull request as ready for review September 7, 2025 18:50
@raj-open raj-open self-assigned this Sep 7, 2025
@raj-open raj-open marked this pull request as draft September 7, 2025 18:51
@raj-open raj-open marked this pull request as ready for review September 7, 2025 18:51
@raj-open raj-open marked this pull request as draft September 7, 2025 19:04
@raj-open raj-open marked this pull request as ready for review September 7, 2025 19:05
@raj-open raj-open marked this pull request as draft September 7, 2025 19:12
@raj-open raj-open marked this pull request as ready for review September 7, 2025 19:12
@raj-open raj-open merged commit 0619b47 into staging Sep 7, 2025
1 check passed
@raj-open raj-open deleted the story-gs branch September 7, 2025 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants