-
Notifications
You must be signed in to change notification settings - Fork 2
Teilpunktebewertung bei RemoveBrackets? #273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
| show sol == simplestString inst = rate 1 | ||
| synTreeEq = reRefuse (rate percentage) (translate $ do | ||
german ("Sie haben " ++ show superfluousBracketsSubmission ++ " überflüssige Klammer(n) in der Abgabe.") | ||
english ("You left " ++ show superfluousBracketsSubmission ++ " superfluous bracket(s) in your submission.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wird hier wirklich die Anzahl der überflüssigen Klammern oder die Anzahl der überflüssigen Klammerpaare ausgegeben?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stimmt, es werden nur Klammerpaare betrachtet. Ich werde den Text und die Variablennamen dementsprechend anpassen.
bracketsSolution = countBrackets $ simplestString inst | ||
bracketsMax = countBrackets $ stringWithSuperfluousBrackets inst | ||
superfluousBracketsSubmission = bracketsSubmission - bracketsSolution | ||
superfluousBracketsSolution = bracketsMax - bracketsSolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ist der Name hier wirklich angebracht? Es ist ja nicht die Anzahl der überflüssigen Klammern in der Lösung (so wie der Wert darüber tatsächlich die Anzahl der überflüssigen Klammern in der Einreichung ist).
bracketsMax = countBrackets $ stringWithSuperfluousBrackets inst | ||
superfluousBracketsSubmission = bracketsSubmission - bracketsSolution | ||
superfluousBracketsSolution = bracketsMax - bracketsSolution | ||
synTreeEq = simplestString inst == simplestDisplay synTreeSubmission |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lässt sich das nicht "besser" durch Vergleich von tree inst
und synTreeSubmission
bestimmen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mir ist Folgendes aufgefallen.
Es sollen zwei überflüssige Klammerpaare eingefügt werden. Es wird folgende Formel generiert:
¬A ∨ (((C ∧ ¬B) ∨ D))
simplestDisplay macht daraus:
¬A ∨ (C ∧ ¬B) ∨ D
Semantisch gleich wäre allerdings auch:
¬A ∨ C ∧ ¬B ∨ D
Da UND stärker bindet als ODER.
Damit sind jetzt allerdings drei überflüssige Klammerpaare in der Formel.
Wenn die Bäume mittels isSemanticEqual geprüft werden, dann werden alle überflüssige Klammern betrachtet. Demnach müsste dann auch die Formelgenerierung geändert werden. Sonst kann man in diesem Fall, wenn man alle Klammerpaare entfernt, 150 % der Punkte bekommen.
Wenn die Operator-Bindung so wie bisher vernachlässigt werden soll, dann müssten wir, denke ich, bei simplestDisplay bleiben.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Da UND stärker bindet als ODER.
Nicht im Kontext der Vorlesung "Einführung in die Logik" für den Komedia-Studiengang. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heißt: Der Aufgabentyp ist so gestrickt, dass er zu den Regeln aus dieser konkreten Vorlesung passt (und er wird bisher auch nur dort verwendet), und diese Regeln sind so, dass die genannten Klammern nicht überflüssig sind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, aber Ihr Fall mit 150% könnte dennoch auftreten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich habe das so eingeben können:
Betrachten Sie die folgende aussagenlogische Formel:
>>>> <¬A ∨ (((C ∧ ¬B) ∨ D))> <<<<
Aufgrund der Assoziativität von ∧ und ∨ muss in Teilformeln mit drei oder mehr atomaren Formeln und den gleichen logischen Operatoren nicht geklammert werden, z.B. bei:
>>>> <A ∧ B ∧ C> <<<<
Genauso sind Klammern bei einer oder mehreren Negationen direkt vor einer atomaren Formel nicht nötig, z.B. bei
>>>> <¬¬A> <<<<
Entfernen Sie alle unnötigen Klammer-Paare in der gegebenen Formel. Geben Sie die Lösung in Form einer aussagenlogischen Formel an.
>>>>Ist z.B. (A ∨ B) die gegebene Formel, dann ist die folgende Lösung korrekt: <<<<
Sie können dafür die ürsprüngliche Formel in das Abgabefeld kopieren und unnötige Klammern entfernen, oder leer startend die folgenden Schreibweisen nutzen:
>>>>Negation: <-, ~, nicht> <<<<
>>>>Und: </, und> <<<<
>>>>Oder: </, oder> <<<<
>>>>Implikation: <=>, <=> <<<<
>>>>Bi-Implikation: <<=>> <<<<
Just ()
¬A ∨ C ∧ ¬B ∨ D
---- Input ----
Delayed "\172A \8744 C \8743 \172B \8744 D"
---- Partial ----
Just ()
---- Complete ----
Die korrekte Lösung ist: <¬A ∨ (C ∧ ¬B) ∨ D>
Sie haben -1 überflüssige Klammerpaare in der Abgabe.Just (3 % 2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, dann ist Ihre Folgerung
bei simplestDisplay bleiben.
zutreffend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bzw., hilft das überhaupt? Was ist denn simplestDisplay synTreeSubmission
, wenn ¬A ∨ C ∧ ¬B ∨ D eingegeben wurde?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stimmt, simplestDisplay
fügt die Klammer wieder hinzu. Dann gibt es dasselbe Problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also müsste der Test vielleicht sein, Kombination aus:
- die Syntaxbäume (wirklich als Bäume) sind gleich, UND
- es lässt sich
simplestString inst
ausshow sol
durch Weglassen (aber keinesfalls Hinzufügen) von Klammern erhalten (oder sowas in der Art).
superfluousBracketsSubmission = bracketsSubmission - bracketsSolution | ||
superfluousBracketsSolution = bracketsMax - bracketsSolution | ||
synTreeEq = simplestString inst == simplestDisplay synTreeSubmission | ||
percentage = (superfluousBracketsSolution - superfluousBracketsSubmission) % superfluousBracketsSolution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Division durch null ist hier irgendwie durch den Kontext bzw. garantierte Constraints (aus einem Config-Checker) ausgeschlossen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Durch diesen Check muss mindestens ein überflüssiges Klammernpaar eingefügt werden. Damit sollte eine Division durch null ausgeschlossen sein.
Als Teil des PR kann dann auch gleich in der Tabelle in der README festgehalten werden, dass dieser Aufgabentyp nun Teilpunktebewertung unterstützt. |
Add case for semantically correct solutions with unsupported simplifications.
Die Variablennamen sind jetzt genauer und es wird überprüft, ob eine Klammer entfernt wurde, die nicht entfernt werden sollte. Kreuz im README gesetzt. Es gibt einen neuen Fall, dass die Formel semantisch korrekt ist, aber Vereinfachungen vorgenommen wurden, die nicht in der Vorlesung behandelt wurden. Der dazugehörige Text sollte auf die Aufgabenstellung abgestimmt werden. Dazu passt #211. |
CLOSE #212