My prompt induced infinite loops with QwQ
I tried prompt with MTG rules inference based on Comprehensive Rules(Rules Text that competitive MTG player mostly look up).
Original Prompt is exactly same as following one:
"Comprehensive Rulesμ λ°λΌμ νλ¨ν λ, νλμ μ무 μ§μλ¬Όλ μκ³ , λ΄ λ±μ μΉ΄λκ° νμ₯ μλ μνμμ Faithless Lootingμ λ°λν΄. κ·Έλ¬λ©΄ μΉ΄λλ₯Ό λ²λ¦¬λ κ²κΉμ§ ν¨κ³Όλ₯Ό μμ ν μ²λ¦¬ν ν ν¨λ°°ν΄, νΉμ λλ²μ§Έ μΉ΄λλ₯Ό λ½μΌλ €κ³ μλνλ μμ μμ ν¨λ°°ν΄? ν΄λΉνλ CRμ λλ²κΉμ§ λΆμ¬μ ν΄μ€ν΄μ€"
(English Translation)
"According to the Comprehensive Rules, if I cast Faithless Looting when there are no permanents on the field and only one card in my library, do I lose after fully resolving the effect including discarding, or do I lose at the moment when attempting to draw the second card? Please explain with the relevant CR numbers."
QwQ initially followed a proper reasoning process, but while referencing the Comprehensive Rules, it fell into an infinite loop by repeatedly searching for the next item without end.
(EDIT : Although it referenced wrong text of Faithless Looting, I focused more on its reasoning process)
QwQ's original Response in brief:
--- Response Start ---
Faithless Lootingλ λ€μκ³Ό κ°μ ν¨κ³Όλ₯Ό κ°μ§κ³ μμ΅λλ€: "Draw two cards. Then, reveal the top card of your library. If it's a creature card, put it into your hand. Otherwise, put it into your graveyard." μ΄ μΉ΄λλ λΉμ μ λ±μ μμͺ½ μΉ΄λλ₯Ό λλ¬λ΄κ³ , κ·Έ μΉ΄λκ° μλ¬Ό μΉ΄λμ΄λ©΄ μμΌλ‘ κ°μ Έμ€κ³ , κ·Έλ μ§ μμΌλ©΄ 무λ€μΌλ‘ 보λ
λλ€.
λ¬Έμ μν©μ λ€μκ³Ό κ°μ΅λλ€: νλμ μ무 μ§μλ¬Όλ μκ³ , λΉμ μ λ±μ μΉ΄λκ° ν μ₯λ§ λ¨μ μμ΅λλ€. μ΄ μνμμ Faithless Lootingμ λ°λν©λλ€.
μ°μ , Faithless Lootingμ ν¨κ³Όλ λ€μκ³Ό κ°μ΄ μ§νλ©λλ€:
λ μ₯μ μΉ΄λλ₯Ό λ½μ΅λλ€.
κ·Έ λ€μ, λΉμ μ λ±μ μμͺ½ μΉ΄λλ₯Ό λλ¬λ λλ€.
λ§μ½ κ·Έ μΉ΄λκ° μλ¬Ό μΉ΄λμ΄λ©΄, μμΌλ‘ κ°μ Έμ΅λλ€.
κ·Έλ μ§ μμΌλ©΄, 무λ€μΌλ‘ 보λ λλ€.
λ¬Έμ λ λ±μλ§ ν μ₯μ μΉ΄λκ° λ¨μ μλ μν©μμ μ΄ ν¨κ³Όλ₯Ό μ²λ¦¬ν λ, μΈμ ν¨λ°°κ° λ°μνλμ§μ λν κ²μ λλ€.
λ¨Όμ , Comprehensive Rules (CR)λ₯Ό μ΄ν΄λ³΄μμΌ ν©λλ€.
CR 104.3a: "If a player is required to draw more cards than are left in his or her library, he or she draws the remaining cards in his or her library and then shuffles his or her graveyard to form a new library. Then, that player draws the remaining number of cards he or she is required to draw."
κ·Έλ¬λ μ΄ κ·μΉμ λ±μ λ¨μ μΉ΄λ μκ° λ½μμΌ ν μΉ΄λ μλ³΄λ€ μ μ λ μ μ©λ©λλ€. νμ¬ μν©μμλ Faithless Lootingμ΄ λ μ₯μ μΉ΄λλ₯Ό λ½λλ‘ νλ©°, λ±μ ν μ₯μ μΉ΄λλ§ μμ΅λλ€.
λ°λΌμ, 첫 λ²μ§Έλ‘ λ μ₯μ μΉ΄λλ₯Ό λ½λ λ¨κ³μμ λ¬Έμ λ°μμ΄ μμλ©λλ€.
CR 120.3: "Drawing a card that can't be drawn because there are no cards in the library results in no cards being drawn, unless another effect specifies what happens in that situation."
νμ§λ§ Faithless Lootingλ λ½μ μΉ΄λκ° μμ λ νΉλ³ν ν¨κ³Όλ₯Ό λͺ μνκ³ μμ§ μμ΅λλ€.
CR 104.3b: "If a player is required to draw more cards than are left in his or her library, he or she draws the remaining cards in his or her library and then shuffles his or her graveyard to form a new library. Then, that player draws the remaining number of cards he or she is required to draw."
μ΄ κ·μΉμ λ°λ₯΄λ©΄, λ½μμΌ ν μΉ΄λ μκ° λ±μ λ¨μ μΉ΄λ μλ³΄λ€ λ§μ κ²½μ°, λ±μ λ¨μ μΉ΄λλ₯Ό λͺ¨λ λ½μ ν, 무λ€μ μμ΄μ μλ‘μ΄ λ±μ λ§λ λ€μ, λ¨μ μμ μΉ΄λλ₯Ό λ½μ΅λλ€.
νμ§λ§ νμ¬ μν©μμ, λ±μ ν μ₯μ μΉ΄λλ§ μμ΅λλ€. λ°λΌμ, λ μ₯μ μΉ΄λλ₯Ό λ½μΌλ €κ³ νλ©΄, ν μ₯μ λ½κ³ λμ 무λ€μ΄ λΉμ΄μμ κ²μ λλ€. λ§μ½ 무λ€μ΄ λΉμ΄ μλ€λ©΄, CR 104.3cλ₯Ό μ°Έμ‘°ν΄μΌ ν©λλ€.
CR 104.3c: "If a player is required to draw a card but has no cards in his or her library and no cards in his or her graveyard, that player doesn't draw a card."
κ·Έλ¬λ μ΄ κ²½μ°μλ, λ±μ ν μ₯μ μΉ΄λκ° μκ³ , 무λ€μ λΉμ΄ μλ μνμ λλ€. λ°λΌμ, 첫 λ²μ§Έ μΉ΄λλ₯Ό λ½μΌλ©΄ λ±μ΄ λΉμ΄ μκ³ , 무λ€μ μ¬μ ν λΉμ΄ μμ΅λλ€. μ΄λ, λ λ²μ§Έ μΉ΄λλ₯Ό λ½μΌλ €κ³ νλ©΄, λ±μ΄ λΉμ΄ μμ΄ λ½μ μΉ΄λκ° μμ΅λλ€. λ°λΌμ, CR 104.3cμ λ°λΌ λ λ²μ§Έ μΉ΄λλ λ½μ μ μμ΅λλ€.
κ·Έλ¬λ Faithless Lootingλ "Draw two cards."λΌκ³ λͺ μλμ΄ μμΌλ―λ‘, λ μ₯μ μΉ΄λλ₯Ό λ½μμΌ ν©λλ€. κ·Έλ¬λ λ±μλ§ ν μ₯μ μΉ΄λκ° μκΈ° λλ¬Έμ, ν μ₯μ λ½κ³ λμλ λ½μ μ μμ΅λλ€.
μ΄ μν©μμ, Comprehensive Rulesλ₯Ό μ°Ύμ보λ, CR 119.3a: "To draw a card, a player removes the top card of his or her library from the library and puts it into his or her hand. This is done as a single action."
κ·Έλ¦¬κ³ CR 119.3b: "If a player is instructed to draw more than one card, he or she performs this action that many times."
λ°λΌμ, λ μ₯μ μΉ΄λλ₯Ό λ½λ κ²μ λ½λ λμμ λ λ² μννλ κ²μ λλ€.
첫 λ²μ§Έ λ½κΈ°: λ±μ ν μ₯μ μΉ΄λκ° μμΌλ―λ‘, κ·Έ μΉ΄λλ₯Ό λ½μ΅λλ€.
λ λ²μ§Έ λ½κΈ°: λ±μ΄ λΉμ΄ μμΌλ―λ‘, CR 104.3cμ λ°λΌ λ½μ μΉ΄λκ° μμ΅λλ€.
κ·Έλ¬λ, μ΄λ ν¨λ°°λ λ°μνμ§ μμ΅λλ€. ν¨λ°°λ νΉλ³ν 쑰건 νμμλ§ λ°μν©λλ€.
CR 104.1: "If a player is required to draw more cards than are left in his or her library, he or she draws the remaining cards, then loses the game the next time a player would receive priority. (This is a state-based action. See rule 704.)"
μ¦, λ±μμ λ μ΄μ λ½μ μΉ΄λκ° μμ λ, κ·Έ λ€μμΌλ‘ μ°μ κΆμ λ°μ λ ν¨λ°°ν©λλ€.
κ·Έλ¬λ, Faithless Lootingμ κ²½μ°, λ μ₯μ μΉ΄λλ₯Ό λ½λ λμμ μννλ €κ³ ν©λλ€. 첫 λ²μ§Έ μΉ΄λλ λ½μ μ μμ§λ§, λ λ²μ§Έ μΉ΄λλ₯Ό λ½μ μ μμ΅λλ€.
μ΄λ, ν¨λ°°λ μΈμ λ°μνλμ§κ° λ¬Έμ μ λλ€.
CR 104.3a: "If a player is required to draw more cards than are left in his or her library, he or she draws the remaining cards in his or her library and then shuffles his or her graveyard to form a new library. Then, that player draws the remaining number of cards he or she is required to draw."
νμ§λ§, νμ¬ μν©μμλ 무λ€μ΄ λΉμ΄ μμ΅λλ€. λ°λΌμ, CR 104.3cμ λ°λΌ λ λ²μ§Έ μΉ΄λλ λ½μ μ μμ΅λλ€.
κ·Έλ¬λ, CR 104.1μ λ°λ₯΄λ©΄, λ½μ μΉ΄λκ° μμ λ, κ·Έ λ€μμΌλ‘ μ°μ κΆμ λ°μ λ ν¨λ°°ν©λλ€.
λ°λΌμ, Faithless Lootingμ ν¨κ³Όλ₯Ό μ²λ¦¬νλ λμ, λ λ²μ§Έ μΉ΄λλ₯Ό λ½μ μ μμ λ, κ·Έ λ€μμΌλ‘ μ°μ κΆμ λ°μ λ ν¨λ°°νκ² λ©λλ€.
νμ§λ§, Faithless Lootingμ ν¨κ³Όλ κ³μ μ§νλ©λλ€.
λ€μ λ¨κ³λ "Then, reveal the top card of your library."μ λλ€.
κ·Έλ¬λ, λ±μ΄ μ΄λ―Έ λΉμ΄ μμΌλ―λ‘, λλ¬λΌ μΉ΄λκ° μμ΅λλ€.
CR 104.4: "If an effect attempts to have a player reveal cards from his or her library, and there are no cards in that library, no cards are revealed. The effect doesn't fail unless specifically indicated otherwise."
λ°λΌμ, λ±μ μΉ΄λκ° μμΌλ―λ‘, λλ¬λΌ μΉ΄λκ° μμ΅λλ€. μ΄ κ²½μ°, ν¨κ³Όλ μ€ν¨νμ§ μμ΅λλ€.
κ·Έλ¬λ, Faithless Lootingμ ν¨κ³Όλ "Then, reveal the top card of your library. If it's a creature card, put it into your hand. Otherwise, put it into your graveyard."μ λλ€.
λ§μ½ λλ¬λΌ μΉ΄λκ° μμΌλ©΄, "it's a creature card" 쑰건μ νκ°ν μ μμ΅λλ€.
μ΄ κ²½μ°, Comprehensive Rulesλ₯Ό μ΄ν΄λ³΄μμΌ ν©λλ€.
CR 608.2b: "Some activated abilities and some triggered abilities include cost payments and/or the word βpay.β These abilities are functions that a player can choose to pay for with the listed costs in order to have them do something."
νμ§λ§ μ΄ κ²½μ°λ ν΄λΉνμ§ μμ΅λλ€.
CR 608.2c: "The value of an activated ability on the stack is determined when it's activated."
μλμ€, μ΄ κ²½μ°λ μλλλ€.
CR 608.2g: "Some continuous effects are replacement effects or prevention effects that apply to objects or events that may exist or occur in the future. These effects wait for a particular event to happen; when it does, the effect replaces or prevents it."
μλμ€.
CR 608.2h: "Some continuous effects are state-based effects. These effects are written as conditions (using the word "if") followed by effects (using the word "then")."
μλμ€.
CR 608.2i: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2j: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2k: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2l: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2m: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2n: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2o: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2p: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2q: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2r: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2s: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2t: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2u: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2v: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2w: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2x: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2y: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2z: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2aa: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2ab: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2ac: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
CR 608.2ad: "Some continuous effects are called delayed triggers. These effects are written as abilities that would normally be triggered abilities, but are worded as continuous effects."
μλμ€.
(Continuous CR References)
--- Response End ---
(Loop stopped around printing CR 608.2md)
This issue may cause significant disruption in user experience, especially for tasks requiring complex reasoning over structured data like game rules. Addressing this problem would improve the model's reliability and usability.
In my opinion, the direct instruction to reference the Comprehensive Rules likely induced the infinite loop. While I cannot confirm this with certainty, I would like to discuss this with others in the community.
EDIT :
I think This infinite loop issue likely arises due to the combination of the following factors:
MTG Comprehensive Rulesβ Nested Structure
The MTG Comprehensive Rules are highly interconnected, with many rules referencing others to resolve edge cases.
This recursive nature might have caused QwQ to continue searching for the "next relevant rule" indefinitely,
failing to establish an endpoint for its reasoning process.Incorrect Faithless Looting Text Reference
QwQ's reasoning process was initially correct, but its reference to Faithless Lootingβs effect text was inaccurate.
(It's actual oracle text is "draw two cards, then discard two cards.")
This discrepancy might have led QwQ to base its reasoning on a flawed premise, further complicating its ability to navigate the rules effectively.Lack of a Clear Stopping Condition
QwQ appears to lack a mechanism to identify when it has exhausted all meaningful references in the Comprehensive Rules.
Instead, it continued attempting to reference new rules, which ultimately resulted in repetitive outputs like "CR 608.2x: No," "CR 608.2y: No," etc., leading to an infinite loop.Prompt Ambiguity and Model Overinterpretation
The phrasing of my prompt (βPlease explain with the relevant CR numbersβ) may have inadvertently encouraged QwQ to reference every possible related rule without a termination criterion.
This suggests that the model might need better handling of broad or open-ended tasks when dealing with structured, highly recursive datasets like the Comprehensive Rules.
While I understand this issue is a phenomenon caused by LLM's probabilistic decision-making, general users tend to use it without considering such aspects.
β» Suggested Improvements
I think adding this features would reduce such a flaw:
(1) Implement Stop Conditions: Ensure the model can identify when it has fully addressed a query, particularly when working with recursive or interconnected data sources.
(2) Validation : Improve the ability to verify and cross-check referenced data, such as card texts or external rulebooks, before proceeding with in-depth reasoning.
(3) Enhance Recursive Query Handling: Introduce safeguards for scenarios where extensive cross-referencing might result in infinite loops.
MTG's Comprehensive Rules are indeed similar to real-world legal codes,
and the process of referencing and interpreting them bears similarities to legal interpretation.
If this issue can be improved, it could help reduce flaws in legal applications as well!
I faced something similar when i was trying to fine tune the model on Long COT and its kept going in loops when asked anything