Wordle solver gives invalid 'hard mode' results
- 主要言語
- Python
- スター
- 11.2k
- フォーク
- 2.1k
- 平均マージ
- 5時間 49分
- マージ済み PR(30日)
- 3
説明
The hard mode solver gives this as a possible hard mode sequence:
CRANE
CACTI
CAPUT
CATCH
The third guess, CAPUT, is invalid in hard mode, because it doesn't take into account the fact that the second C in CACTI was marked as yellow.
I believe that the bug is in the `generate_pattern_grid` function, which checks if yellow squares contribute to the result with
`patterns[:, :] += tp * equality_grid[:, :, i, :].any(2)`
I can't see a way to fix it while keeping the code vectorized.
I suspect this bug also distorts the non-hard mode results, but in a way that can't be detected just by looking at the results.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
このIssueは、Wordleソルバーの hard mode における黄色マスの処理に関連する `generate_pattern_grid` 関数のバグを指しています。まず、黄色マスの寄与に関する関数のロジックを確認し、特に `patterns[:, :] += tp * equality_grid[:, :, i, :].any(2)` を使用している行を確認してください。周囲のコードをレビューして、ベクトル化された操作と hard mode 制約がどのように適用されるかを理解してください。提供されたシーケンス (CRANE, CACTI, CAPUT, CATCH) でテストすると、問題を再現するのに役立つ可能性があります。修正が必要かどうかを判断し、コードの一部をベクトル化解除する必要があるか、またはパターン生成ロジックを調整する必要があるかを決定してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100