Esempio n. 1
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        self.params["dominant_quality"] = "neg"
        self.params["dominant_quantifier"] = "some"

        self.param_grid["dominant_quality"] = ["neg", "pos"]
        self.param_grid["dominant_quantifier"] = ["some", "all"]
Esempio n. 2
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)
        self.params["total_order"] = [["E", "O", "I", "A"], ["=", "=", ">"]]

        relations = [["="] * 3, [">"] * 3, ["=", "=", ">"], ["=", ">", "="],
                     [">", "=", "="], ["=", ">", ">"], [">", "=", ">"],
                     [">", ">", "="]]
        moods = list(itertools.permutations(["A", "E", "I", "O"]))
        self.param_grid["total_order"] = list([
            (tuple(x), tuple(y))
            for x, y in itertools.product(moods, relations)
        ])
Esempio n. 3
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        # For meaning of parameteres see Polk & Newell 1995.
        self.params["p1"] = "b"
        self.params["p2"] = "a"
        self.params["p3"] = "a"
        self.params["p4"] = "a"
        self.params["p5"] = "b"
        self.params["p6"] = "a"

        self.params["p10"] = "b"
        self.params["p11"] = "b"
        self.params["p12"] = "b"
        self.params["p13"] = "c"

        self.params["p14"] = "b"
        self.params["p15"] = "c"
        self.params["p16"] = "c"
        self.params["p17"] = "c"

        self.params["p18"] = "b"
        self.params["p19"] = "c"
        self.params["p20"] = "b"
        self.params["p21"] = "c"

        # Commented out parameter ranges are implemented but left out to reduce parameter space.
        self.param_grid["p1"] = ["a", "b", "c"]  # ["a", "b", "c", "d", "e"]
        self.param_grid["p2"] = ["a", "b", "c"]  # ["a", "b", "c", "d", "e"]
        self.param_grid["p3"] = ["a", "b"]
        self.param_grid["p4"] = ["a", "b", "c"]  # ["a", "b", "c", "d"]
        self.param_grid["p5"] = ["a", "b"]
        self.param_grid["p6"] = ["a", "b", "c"]  # ["a", "b", "c", "d"]

        self.param_grid["p10"] = ["a", "b"]  # VR1/2: "a", VR3: "b"
        self.param_grid["p11"] = ["a", "b"]  # VR1: "a", VR2/3: "b"
        self.param_grid["p12"] = ["a", "b"]  # VR1: "a", VR2/3: "b"
        self.param_grid["p13"] = ["a", "c"]  # VR1/2: "a", VR3: "c"

        self.param_grid["p14"] = ["a", "b"]  # VR1/2: "a", VR3: "b"
        self.param_grid["p15"] = ["a", "c"]  # VR1/2: "a", VR3: "c"
        self.param_grid["p16"] = ["a", "c"]  # VR1/2: "a", VR3: "c"
        self.param_grid["p17"] = ["a", "c"]  # VR1/2: "a", VR3: "c"

        self.param_grid["p18"] = ["a", "b"]  # VR1/2: "a", VR3: "b"
        self.param_grid["p19"] = ["a", "c"]  # VR1/2: "a", VR3: "c"
        self.param_grid["p20"] = ["a", "b"]  # VR1/2: "a", VR3: "b"
        self.param_grid["p21"] = ["a", "c"]  # VR1/2: "a", VR3: "c"

        self.is_stochastic = False

        # global counter to measure access time
        self.t = -1
Esempio n. 4
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        # Use blackbox logically correct reasoning as deduction mechanism
        self.reasoning_model = LogicallyValidLookup()

        self.params["reverse_first_premise"] = 1.0
        self.params["reverse_second_premise"] = 1.0
        self.params["reverse_A"] = 1.0
        self.params["reverse_O"] = 1.0

        self.param_grid["reverse_first_premise"] = [0.0, 1.0]
        self.param_grid["reverse_second_premise"] = [0.0, 1.0]
        self.param_grid["reverse_A"] = [0.0, 1.0]
        self.param_grid["reverse_O"] = [0.0, 1.0]
Esempio n. 5
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        self.params["p-entailment"] = 0.6

        # max heuristic
        self.params["confidenceA"] = 0.7
        self.params["confidenceI"] = 0.6
        self.params["confidenceE"] = 0.5
        self.params["confidenceO"] = 0.4

        self.param_grid["p-entailment"] = [0.0, 1.0]
        self.param_grid["confidenceA"] = [0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]
        self.param_grid["confidenceI"] = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
        self.param_grid["confidenceE"] = [0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]
        self.param_grid["confidenceO"] = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
Esempio n. 6
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        # Size of encoded models
        self.params["lambda"] = 4.0

        # Deviation from canoncality in model encoding
        self.params["epsilon"] = 0.0

        # The probability that counterexamples are searched for (= sigma in Khemlani 2016)
        self.params["System 2"] = 1.0

        # The probability that a conclusion is weakened when a counterexample is found (rather than returning NVC)
        self.params["Weaken"] = 1.0

        # Same grid as Khemlani and Johnson-Laird 2016
        self.param_grid["lambda"] = [2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0]
        self.param_grid["epsilon"] = [0.0, 0.2, 0.4, 0.6, 0.8, 1.0]
        self.param_grid["System 2"] = [0.0, 1.0]
        self.param_grid["Weaken"] = [0.0, 1.0]
Esempio n. 7
0
    def __init__(self):
        SyllogisticReasoningModel.__init__(self)

        # Prospensity to guess instead of replying NVC if no conclusion is found
        self.params["guess"] = 0.0

        # Whether or not existential implicatures are added to the forward propositions
        self.params["premise_implicatures_existential"] = True

        # Whether or not gricean implicatures are added to the forward propositions
        self.params["premise_implicatures_grice"] = True

        # Whether or not proving conclusion implicatures is required to prove a conclusion
        self.params["conclusion_implicatures"] = False

        # Availability of rules
        self.params["rule_transitivity"] = True
        self.params["rule_exclusivity"] = True
        self.params["rule_conversion"] = True
        self.params["rule_fw_and_elimination"] = True
        self.params["rule_bw_and_introduction"] = True
        self.params["rule_bw_conjunctive_syllogism"] = True
        self.params["rule_bw_if_elimination"] = True
        self.params["rule_bw_not_introduction"] = True

        self.param_grid["guess"] = [0.0, 1.0]

        self.param_grid["premise_implicatures_existential"] = [True, False]
        self.param_grid["premise_implicatures_grice"] = [True, False]
        self.param_grid["conclusion_implicatures"] = [False, True]

        self.param_grid["rule_transitivity"] = [True, False]
        self.param_grid["rule_exclusivity"] = [True, False]
        self.param_grid["rule_conversion"] = [True, False]
        self.param_grid["rule_fw_and_elimination"] = [True, False]
        self.param_grid["rule_bw_and_introduction"] = [True, False]
        self.param_grid["rule_bw_conjunctive_syllogism"] = [True, False]
        self.param_grid["rule_bw_if_elimination"] = [True, False]
        self.param_grid["rule_bw_not_introduction"] = [True, False]
Esempio n. 8
0
 def __init__(self):
     SyllogisticReasoningModel.__init__(self)
Esempio n. 9
0
 def __init__(self):
     SyllogisticReasoningModel.__init__(self)
     self.params["falsify_first"] = 0.5
     self.param_grid["falsify_first"] = [0.0, 0.5, 0.95]
     self.params["falsify_further"] = 0.5
     self.param_grid["falsify_further"] = [0.0, 0.5, 0.95]