Esempio n. 1
0
        //
        // Given, the list of generated, interesting problems, validate (for soundness) the fact that the original book problem was generated.
        // Do so by constructing a goal-based isomorphism partitioning and check that there exists a problem with the same given set.
        //
        private void Validate(List <GeometryTutorLib.ProblemAnalyzer.Problem <GeometryTutorLib.Hypergraph.EdgeAnnotation> > problems, ProofProblemFigureStatisticsAggregator figureStats)
        {
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector query = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructGoalIsomorphismQueryVector();

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace goalBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, query);

            goalBasedPartitions.ConstructPartitions(problems);

            // Validate that we have generated all of the original problems from the text.
            List <GeometryTutorLib.ProblemAnalyzer.Problem <GeometryTutorLib.Hypergraph.EdgeAnnotation> > generatedBookProblems = goalBasedPartitions.ValidateOriginalProblems(givens, goals);

            figureStats.totalBookProblemsGenerated = generatedBookProblems.Count;

            if (GeometryTutorLib.Utilities.PROBLEM_GEN_DEBUG)
            {
                goalBasedPartitions.DumpPartitions();
            }
            if (GeometryTutorLib.Utilities.BACKWARD_PROBLEM_GEN_DEBUG)
            {
                Debug.WriteLine("\nAll " + generatedBookProblems.Count + " Book-specified problems: \n");
                foreach (GeometryTutorLib.ProblemAnalyzer.Problem <GeometryTutorLib.Hypergraph.EdgeAnnotation> bookProb in generatedBookProblems)
                {
                    Debug.WriteLine(bookProb.ConstructProblemAndSolution(graph));
                }
            }

            figureStats.goalPartitionSummary = goalBasedPartitions.GetGoalBasedPartitionSummary();
        }
Esempio n. 2
0
        private void GenerateIsomorphicStatistics(List <GeometryTutorLib.ProblemAnalyzer.Problem <GeometryTutorLib.Hypergraph.EdgeAnnotation> > problems, StatisticsGenerator.ProofProblemFigureStatisticsAggregator figureStats)
        {
            //
            // Determine number of problems based on SOURCE isomorphism
            //
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector sourceQuery = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructSourceIsomorphismQueryVector();

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace sourceBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, sourceQuery);

            sourceBasedPartitions.ConstructPartitions(problems);

            figureStats.sourcePartitionSummary = sourceBasedPartitions.GetPartitionSummary();

            //
            // Determine number of problems based on DIFFICULTY of the problems (easy, medium difficult, extreme) based on the number of deductions
            //
            // Construct the partitions:
            // 25% Easy
            // 50% Medium
            // 75% Difficult
            // 100% Extreme
            //
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector difficultyQuery = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructDeductiveBasedIsomorphismQueryVector(GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructDifficultyPartitionBounds());

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace difficultyBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, difficultyQuery);

            difficultyBasedPartitions.ConstructPartitions(problems);

            figureStats.difficultyPartitionSummary = difficultyBasedPartitions.GetDifficultyPartitionSummary();

            //
            // Determine number of interesting problems based percentage of givens covered.
            //
            // Construct the partitions:
            // 0-2 Easy
            // 3-5 Medium
            // 6-10 Difficult
            // 10+ Extreme
            //
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector interestingQuery = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructInterestingnessIsomorphismQueryVector(GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructInterestingPartitionBounds());

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace interestingBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, interestingQuery);

            interestingBasedPartitions.ConstructPartitions(problems);

            figureStats.interestingPartitionSummary = interestingBasedPartitions.GetInterestingPartitionSummary();
        }
        //
        // Given, the list of generated, interesting problems, validate (for soundness) the fact that the original book problem was generated.
        // Do so by constructing a goal-based isomorphism partitioning and check that there exists a problem with the same given set.
        //
        private void Validate(List<GeometryTutorLib.ProblemAnalyzer.Problem<GeometryTutorLib.Hypergraph.EdgeAnnotation>> problems, ProofProblemFigureStatisticsAggregator figureStats)
        {
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector query = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructGoalIsomorphismQueryVector();

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace goalBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, query);

            goalBasedPartitions.ConstructPartitions(problems);

            // Validate that we have generated all of the original problems from the text.
            List<GeometryTutorLib.ProblemAnalyzer.Problem<GeometryTutorLib.Hypergraph.EdgeAnnotation>> generatedBookProblems = goalBasedPartitions.ValidateOriginalProblems(givens, goals);
            figureStats.totalBookProblemsGenerated = generatedBookProblems.Count;

            if (GeometryTutorLib.Utilities.PROBLEM_GEN_DEBUG)
            {
                goalBasedPartitions.DumpPartitions();
            }
            if (GeometryTutorLib.Utilities.BACKWARD_PROBLEM_GEN_DEBUG)
            {
                Debug.WriteLine("\nAll " + generatedBookProblems.Count + " Book-specified problems: \n");
                foreach (GeometryTutorLib.ProblemAnalyzer.Problem<GeometryTutorLib.Hypergraph.EdgeAnnotation> bookProb in generatedBookProblems)
                {
                    Debug.WriteLine(bookProb.ConstructProblemAndSolution(graph));
                }
            }

            figureStats.goalPartitionSummary = goalBasedPartitions.GetGoalBasedPartitionSummary();
        }
        private void GenerateStrictIsomorphicStatistics(List<GeometryTutorLib.ProblemAnalyzer.Problem<GeometryTutorLib.Hypergraph.EdgeAnnotation>> problems, StatisticsGenerator.ProofProblemFigureStatisticsAggregator figureStats)
        {
            //
            // Determine number of problems based on DIFFICULTY of the problems (easy, medium difficult, extreme) based on the number of deductions
            //
            // Construct the partitions:
            // 25% Easy
            // 50% Medium
            // 75% Difficult
            // 100% Extreme
            //
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector difficultyQuery = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructDeductiveBasedIsomorphismQueryVector(GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructDifficultyPartitionBounds());

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace difficultyBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, difficultyQuery);

            difficultyBasedPartitions.ConstructPartitions(problems);

            figureStats.strictDifficultyPartitionSummary = difficultyBasedPartitions.GetDifficultyPartitionSummary();

            //
            // Determine number of interesting problems based percentage of givens covered.
            //
            // Construct the partitions:
            // 0-2 Easy
            // 3-5 Medium
            // 6-10 Difficult
            // 10+ Extreme
            //
            GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector interestingQuery = GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructInterestingnessIsomorphismQueryVector(GeometryTutorLib.ProblemAnalyzer.QueryFeatureVector.ConstructInterestingPartitionBounds());

            GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace interestingBasedPartitions = new GeometryTutorLib.ProblemAnalyzer.PartitionedProblemSpace(graph, interestingQuery);

            interestingBasedPartitions.ConstructPartitions(problems);

            figureStats.strictInterestingPartitionSummary = interestingBasedPartitions.GetInterestingPartitionSummary();
        }