From 382ed3e98103ad8f56b80d1456e08a04b32f6878 Mon Sep 17 00:00:00 2001 From: lipeiji <2247778946@qq.com> Date: Tue, 17 Jun 2025 12:37:44 +0800 Subject: [PATCH] fix earth typhoon --- .../data_configs/data_config_test.jsonl | 86 +--------------- .../data_configs/data_config_train.jsonl | 85 +--------------- .../puzzle_configs/earth_typhoon_test.json | 4 +- .../puzzle_configs/earth_typhoon_train.json | 4 +- internbootcamp/bootcamp/__init__.py | 3 +- .../bootcamp/earth_typhoon/earth_typhoon.py | 97 ++++++++++++++----- 6 files changed, 83 insertions(+), 196 deletions(-) diff --git a/examples/pipelines/data_configs/data_config_test.jsonl b/examples/pipelines/data_configs/data_config_test.jsonl index 06d8977..bc57a46 100644 --- a/examples/pipelines/data_configs/data_config_test.jsonl +++ b/examples/pipelines/data_configs/data_config_test.jsonl @@ -1,83 +1,3 @@ -{"bootcamp_name": "SymbolicRegression", "sample_number": 100, "config_file": "Symbolic_Regression", "bootcamp_cls_name": "SymbolicRegressionbootcamp"} -{"bootcamp_name": "cipher", "sample_number": 3, "config_file": "cipher", "bootcamp_cls_name": "Cipherbootcamp"} -{"bootcamp_name": "korLogicDefinitions", "sample_number": 64, "config_file": "korLogicDefinitions", "bootcamp_cls_name": "KorLogicDefinitionsbootcamp"} -{"bootcamp_name": "korLogicCooperativePrinciple", "sample_number": 64, "config_file": "korLogicCooperativePrinciple", "bootcamp_cls_name": "KorLogicCooperativePrinciplebootcamp"} -{"bootcamp_name": "korOperationUnicodeffe0", "sample_number": 64, "config_file": "korOperationUnicodeffe0", "bootcamp_cls_name": "KorOperationUnicodeffe0bootcamp"} -{"bootcamp_name": "korLogicEpistemicLogic", "sample_number": 64, "config_file": "korLogicEpistemicLogic", "bootcamp_cls_name": "KorLogicEpistemicLogicbootcamp"} -{"bootcamp_name": "korLogicDerivativeReasoningOfPropositionalLogic", "sample_number": 64, "config_file": "korLogicDerivativeReasoningOfPropositionalLogic", "bootcamp_cls_name": "KorLogicDerivativeReasoningOfPropositionalLogicbootcamp"} -{"bootcamp_name": "korLogicTruthValueModalPropositions", "sample_number": 64, "config_file": "korLogicTruthValueModalPropositions", "bootcamp_cls_name": "KorLogicTruthValueModalPropositionsbootcamp"} -{"bootcamp_name": "BBEHBuggyTables", "sample_number": 64, "config_file": "BBEHBuggyTables", "bootcamp_cls_name": "BBEHBuggyTablesbootcamp"} -{"bootcamp_name": "BbehWordSorting", "sample_number": 64, "config_file": "BbehWordSorting", "bootcamp_cls_name": "BbehWordSortingbootcamp"} -{"bootcamp_name": "korLogicFigureOfTheSyllogism", "sample_number": 64, "config_file": "korLogicFigureOfTheSyllogism", "bootcamp_cls_name": "KorLogicFigureOfTheSyllogismbootcamp"} -{"bootcamp_name": "korLogicResolution", "sample_number": 64, "config_file": "korLogicResolution", "bootcamp_cls_name": "KorLogicResolutionbootcamp"} -{"bootcamp_name": "thermometers", "sample_number": 64, "config_file": "thermometers", "bootcamp_cls_name": "Thermometersbootcamp"} -{"bootcamp_name": "korPuzzleCalcudoko", "sample_number": 64, "config_file": "korPuzzleCalcudoko", "bootcamp_cls_name": "KorPuzzleCalcudokobootcamp"} -{"bootcamp_name": "korPuzzle24Points", "sample_number": 64, "config_file": "korPuzzle24Points", "bootcamp_cls_name": "KorPuzzle24Pointsbootcamp"} -{"bootcamp_name": "korOperationUnicode2295", "sample_number": 64, "config_file": "korOperationUnicode2295", "bootcamp_cls_name": "KorOperationUnicode2295bootcamp"} -{"bootcamp_name": "nonograms", "sample_number": 64, "config_file": "nonograms", "bootcamp_cls_name": "Nonogramsbootcamp"} -{"bootcamp_name": "bbehboardgameqa", "sample_number": 64, "config_file": "bbeh_boardgame_qa", "bootcamp_cls_name": "Bbehboardgameqabootcamp"} -{"bootcamp_name": "korLogicEquivalenceCalculus", "sample_number": 64, "config_file": "korLogicEquivalenceCalculus", "bootcamp_cls_name": "KorLogicEquivalenceCalculusbootcamp"} -{"bootcamp_name": "dominosa", "sample_number": 64, "config_file": "dominosa", "bootcamp_cls_name": "Dominosabootcamp"} -{"bootcamp_name": "korPuzzleCryptoMath", "sample_number": 64, "config_file": "korPuzzleCryptoMath", "bootcamp_cls_name": "KorPuzzleCryptoMathbootcamp"} -{"bootcamp_name": "korLogicAnalogicalReasoning", "sample_number": 64, "config_file": "korLogicAnalogicalReasoning", "bootcamp_cls_name": "KorLogicAnalogicalReasoningbootcamp"} -{"bootcamp_name": "korOperationUnicode25bd", "sample_number": 64, "config_file": "korOperationUnicode25bd", "bootcamp_cls_name": "KorOperationUnicode25bdbootcamp"} -{"bootcamp_name": "korPuzzleWordBrainTeasers", "sample_number": 64, "config_file": "korPuzzleWordBrainTeasers", "bootcamp_cls_name": "KorPuzzleWordBrainTeasersbootcamp"} -{"bootcamp_name": "korOperationUnicode25a1", "sample_number": 64, "config_file": "korOperationUnicode25a1", "bootcamp_cls_name": "KorOperationUnicode25a1bootcamp"} -{"bootcamp_name": "kakurasu", "sample_number": 64, "config_file": "kakurasu", "bootcamp_cls_name": "Kakurasubootcamp"} -{"bootcamp_name": "korLogicLogicalMethodsForExploringCauseAndEffectRelationships", "sample_number": 64, "config_file": "korLogicLogicalMethodsForExploringCauseAndEffectRelationships", "bootcamp_cls_name": "KorLogicLogicalMethodsForExploringCauseAndEffectRelationshipsbootcamp"} -{"bootcamp_name": "binairo", "sample_number": 64, "config_file": "binairo", "bootcamp_cls_name": "Binairobootcamp"} -{"bootcamp_name": "korLogicInductionParadox", "sample_number": 64, "config_file": "korLogicInductionParadox", "bootcamp_cls_name": "KorLogicInductionParadoxbootcamp"} -{"bootcamp_name": "galaxies", "sample_number": 64, "config_file": "galaxies", "bootcamp_cls_name": "Galaxiesbootcamp"} -{"bootcamp_name": "BbehMultistepArithmetic", "sample_number": 64, "config_file": "BbehMultistepArithmetic", "bootcamp_cls_name": "BbehMultistepArithmeticbootcamp"} -{"bootcamp_name": "korLogicPropositionalLogicFormalization", "sample_number": 64, "config_file": "korLogicPropositionalLogicFormalization", "bootcamp_cls_name": "KorLogicPropositionalLogicFormalizationbootcamp"} -{"bootcamp_name": "korOperationUnicode25cb", "sample_number": 64, "config_file": "korOperationUnicode25cb", "bootcamp_cls_name": "KorOperationUnicode25cbbootcamp"} -{"bootcamp_name": "LightUp", "sample_number": 64, "config_file": "Light_Up", "bootcamp_cls_name": "LightUpbootcamp"} -{"bootcamp_name": "starbattle", "sample_number": 64, "config_file": "starbattle", "bootcamp_cls_name": "Starbattlebootcamp"} -{"bootcamp_name": "korOperationUnicode25b3", "sample_number": 64, "config_file": "korOperationUnicode25b3", "bootcamp_cls_name": "KorOperationUnicode25b3bootcamp"} -{"bootcamp_name": "sudoku", "sample_number": 64, "config_file": "sudoku", "bootcamp_cls_name": "Sudokubootcamp"} -{"bootcamp_name": "korLogicSpeechActs", "sample_number": 64, "config_file": "korLogicSpeechActs", "bootcamp_cls_name": "KorLogicSpeechActsbootcamp"} -{"bootcamp_name": "korOperationUnicode25a0", "sample_number": 64, "config_file": "korOperationUnicode25a0", "bootcamp_cls_name": "KorOperationUnicode25a0bootcamp"} -{"bootcamp_name": "korLogicStatisticalReasoning", "sample_number": 64, "config_file": "korLogicStatisticalReasoning", "bootcamp_cls_name": "KorLogicStatisticalReasoningbootcamp"} -{"bootcamp_name": "aquarium", "sample_number": 64, "config_file": "aquarium", "bootcamp_cls_name": "Aquariumbootcamp"} -{"bootcamp_name": "korLogicEnumerativeInductiveReasoning", "sample_number": 64, "config_file": "korLogicEnumerativeInductiveReasoning", "bootcamp_cls_name": "KorLogicEnumerativeInductiveReasoningbootcamp"} -{"bootcamp_name": "minesweeper", "sample_number": 64, "config_file": "minesweeper", "bootcamp_cls_name": "Minesweeperbootcamp"} -{"bootcamp_name": "futoshiki", "sample_number": 64, "config_file": "futoshiki", "bootcamp_cls_name": "Futoshikibootcamp"} -{"bootcamp_name": "BbehWebOfLies", "sample_number": 64, "config_file": "BbehWebOfLies", "bootcamp_cls_name": "BbehWebOfLiesbootcamp"} -{"bootcamp_name": "korOperationUnicode2605", "sample_number": 64, "config_file": "korOperationUnicode2605", "bootcamp_cls_name": "KorOperationUnicode2605bootcamp"} -{"bootcamp_name": "korPuzzleLogicPuzzle", "sample_number": 64, "config_file": "korPuzzleLogicPuzzle", "bootcamp_cls_name": "KorPuzzleLogicPuzzlebootcamp"} -{"bootcamp_name": "BbehGeometricShapes", "sample_number": 64, "config_file": "BbehGeometricShapes", "bootcamp_cls_name": "BbehGeometricShapesbootcamp"} -{"bootcamp_name": "korPuzzleWordRootsAndAffixes", "sample_number": 64, "config_file": "korPuzzleWordRootsAndAffixes", "bootcamp_cls_name": "KorPuzzleWordRootsAndAffixesbootcamp"} -{"bootcamp_name": "korPuzzleSkyscrapers", "sample_number": 64, "config_file": "korPuzzleSkyscrapers", "bootcamp_cls_name": "KorPuzzleSkyscrapersbootcamp"} -{"bootcamp_name": "korOperationUnicode25cf", "sample_number": 64, "config_file": "korOperationUnicode25cf", "bootcamp_cls_name": "KorOperationUnicode25cfbootcamp"} -{"bootcamp_name": "korLogicPredicateLogicFormalization", "sample_number": 64, "config_file": "korLogicPredicateLogicFormalization", "bootcamp_cls_name": "KorLogicPredicateLogicFormalizationbootcamp"} -{"bootcamp_name": "korPuzzleArrowMaze", "sample_number": 64, "config_file": "korPuzzleArrowMaze", "bootcamp_cls_name": "KorPuzzleArrowMazebootcamp"} -{"bootcamp_name": "bbehshuffobject", "sample_number": 64, "config_file": "bbeh_shuff_object", "bootcamp_cls_name": "Bbehshuffobjectbootcamp"} -{"bootcamp_name": "korPuzzleKukurasu", "sample_number": 64, "config_file": "korPuzzleKukurasu", "bootcamp_cls_name": "KorPuzzleKukurasubootcamp"} -{"bootcamp_name": "korLogicDynamicLogic", "sample_number": 64, "config_file": "korLogicDynamicLogic", "bootcamp_cls_name": "KorLogicDynamicLogicbootcamp"} -{"bootcamp_name": "korLogicDisjunctiveNormalFormAndConjunctiveNormalForm", "sample_number": 64, "config_file": "korLogicDisjunctiveNormalFormAndConjunctiveNormalForm", "bootcamp_cls_name": "KorLogicDisjunctiveNormalFormAndConjunctiveNormalFormbootcamp"} -{"bootcamp_name": "korPuzzleWordscapes", "sample_number": 64, "config_file": "korPuzzleWordscapes", "bootcamp_cls_name": "KorPuzzleWordscapesbootcamp"} -{"bootcamp_name": "bbehobjectproperties", "sample_number": 64, "config_file": "bbeh_object_properties", "bootcamp_cls_name": "Bbehobjectpropertiesbootcamp"} -{"bootcamp_name": "stitches", "sample_number": 64, "config_file": "stitches", "bootcamp_cls_name": "Stitchesbootcamp"} -{"bootcamp_name": "korPuzzleWordLadder", "sample_number": 64, "config_file": "korPuzzleWordLadder", "bootcamp_cls_name": "KorPuzzleWordLadderbootcamp"} -{"bootcamp_name": "BbehDyckLanguages", "sample_number": 64, "config_file": "BbehDyckLanguages", "bootcamp_cls_name": "BbehDyckLanguagesbootcamp"} -{"bootcamp_name": "calcudoku", "sample_number": 64, "config_file": "calcudoku", "bootcamp_cls_name": "Calcudokubootcamp"} -{"bootcamp_name": "korOperationUnicodeffe1", "sample_number": 64, "config_file": "korOperationUnicodeffe1", "bootcamp_cls_name": "KorOperationUnicodeffe1bootcamp"} -{"bootcamp_name": "korPuzzleCampsite", "sample_number": 64, "config_file": "korPuzzleCampsite", "bootcamp_cls_name": "KorPuzzleCampsitebootcamp"} -{"bootcamp_name": "korOperationUnicode20ac", "sample_number": 64, "config_file": "korOperationUnicode20ac", "bootcamp_cls_name": "KorOperationUnicode20acbootcamp"} -{"bootcamp_name": "korLogicPropositionalLogicConcepts", "sample_number": 64, "config_file": "korLogicPropositionalLogicConcepts", "bootcamp_cls_name": "KorLogicPropositionalLogicConceptsbootcamp"} -{"bootcamp_name": "arc", "sample_number": 64, "config_file": "arc", "bootcamp_cls_name": "Arcbootcamp"} -{"bootcamp_name": "korPuzzleWordSearch", "sample_number": 64, "config_file": "korPuzzleWordSearch", "bootcamp_cls_name": "KorPuzzleWordSearchbootcamp"} -{"bootcamp_name": "cryptomath", "sample_number": 64, "config_file": "crypto_math", "bootcamp_cls_name": "Cryptomathbootcamp"} -{"bootcamp_name": "arrowmaze", "sample_number": 64, "config_file": "arrowmaze", "bootcamp_cls_name": "Arrowmazebootcamp"} -{"bootcamp_name": "korLogicTemporalPropositions", "sample_number": 64, "config_file": "korLogicTemporalPropositions", "bootcamp_cls_name": "KorLogicTemporalPropositionsbootcamp"} -{"bootcamp_name": "bbehbooleanexpressions", "sample_number": 64, "config_file": "bbeh_boolean_expressions", "bootcamp_cls_name": "Bbehbooleanexpressionsbootcamp"} -{"bootcamp_name": "tents", "sample_number": 64, "config_file": "tents", "bootcamp_cls_name": "Tentsbootcamp"} -{"bootcamp_name": "bbehobjectcounting", "sample_number": 64, "config_file": "bbeh_object_counting", "bootcamp_cls_name": "Bbehobjectcountingbootcamp"} -{"bootcamp_name": "game24", "sample_number": 64, "config_file": "game24", "bootcamp_cls_name": "Game24bootcamp"} -{"bootcamp_name": "maze", "sample_number": 64, "config_file": "maze", "bootcamp_cls_name": "Mazebootcamp"} -{"bootcamp_name": "korOperationUnicode25ce", "sample_number": 64, "config_file": "korOperationUnicode25ce", "bootcamp_cls_name": "KorOperationUnicode25cebootcamp"} -{"bootcamp_name": "campsite", "sample_number": 64, "config_file": "campsite", "bootcamp_cls_name": "Campsitebootcamp"} -{"bootcamp_name": "korLogicCanonicalPropositions", "sample_number": 64, "config_file": "korLogicCanonicalPropositions", "bootcamp_cls_name": "KorLogicCanonicalPropositionsbootcamp"} -{"bootcamp_name": "korPuzzleConnectWords", "sample_number": 64, "config_file": "korPuzzleConnectWords", "bootcamp_cls_name": "KorPuzzleConnectWordsbootcamp"} -{"bootcamp_name": "korLogicFormalFallacies", "sample_number": 64, "config_file": "korLogicFormalFallacies", "bootcamp_cls_name": "KorLogicFormalFallaciesbootcamp"} -{"bootcamp_name": "BBEHHyperbaton", "sample_number": 64, "config_file": "BBEHHyperbaton", "bootcamp_cls_name": "BBEHHyperbatonbootcamp"} +{"bootcamp_name": "earthtyphoon", "sample_number": 100, "config_file": "earth_typhoon", "bootcamp_cls_name": "Earthtyphoonbootcamp"} + + diff --git a/examples/pipelines/data_configs/data_config_train.jsonl b/examples/pipelines/data_configs/data_config_train.jsonl index f438374..102e743 100644 --- a/examples/pipelines/data_configs/data_config_train.jsonl +++ b/examples/pipelines/data_configs/data_config_train.jsonl @@ -1,83 +1,2 @@ -{"bootcamp_name": "SymbolicRegression", "sample_number": 30000, "config_file": "Symbolic_Regression", "bootcamp_cls_name": "SymbolicRegressionbootcamp"} -{"bootcamp_name": "cipher", "sample_number": 200, "config_file": "cipher", "bootcamp_cls_name": "Cipherbootcamp"} -{"bootcamp_name": "korLogicDisjunctiveNormalFormAndConjunctiveNormalForm", "sample_number": 1000, "config_file": "korLogicDisjunctiveNormalFormAndConjunctiveNormalForm", "bootcamp_cls_name": "KorLogicDisjunctiveNormalFormAndConjunctiveNormalFormbootcamp"} -{"bootcamp_name": "korLogicFigureOfTheSyllogism", "sample_number": 1000, "config_file": "korLogicFigureOfTheSyllogism", "bootcamp_cls_name": "KorLogicFigureOfTheSyllogismbootcamp"} -{"bootcamp_name": "korPuzzle24Points", "sample_number": 1000, "config_file": "korPuzzle24Points", "bootcamp_cls_name": "KorPuzzle24Pointsbootcamp"} -{"bootcamp_name": "stitches", "sample_number": 2000, "config_file": "stitches", "bootcamp_cls_name": "Stitchesbootcamp"} -{"bootcamp_name": "bbehobjectproperties", "sample_number": 2000, "config_file": "bbeh_object_properties", "bootcamp_cls_name": "Bbehobjectpropertiesbootcamp"} -{"bootcamp_name": "thermometers", "sample_number": 2000, "config_file": "thermometers", "bootcamp_cls_name": "Thermometersbootcamp"} -{"bootcamp_name": "BBEHBuggyTables", "sample_number": 2000, "config_file": "BBEHBuggyTables", "bootcamp_cls_name": "BBEHBuggyTablesbootcamp"} -{"bootcamp_name": "korLogicDynamicLogic", "sample_number": 1000, "config_file": "korLogicDynamicLogic", "bootcamp_cls_name": "KorLogicDynamicLogicbootcamp"} -{"bootcamp_name": "futoshiki", "sample_number": 2000, "config_file": "futoshiki", "bootcamp_cls_name": "Futoshikibootcamp"} -{"bootcamp_name": "korLogicStatisticalReasoning", "sample_number": 1000, "config_file": "korLogicStatisticalReasoning", "bootcamp_cls_name": "KorLogicStatisticalReasoningbootcamp"} -{"bootcamp_name": "nonograms", "sample_number": 2000, "config_file": "nonograms", "bootcamp_cls_name": "Nonogramsbootcamp"} -{"bootcamp_name": "bbehboardgameqa", "sample_number": 2000, "config_file": "bbeh_boardgame_qa", "bootcamp_cls_name": "Bbehboardgameqabootcamp"} -{"bootcamp_name": "korPuzzleWordscapes", "sample_number": 1000, "config_file": "korPuzzleWordscapes", "bootcamp_cls_name": "KorPuzzleWordscapesbootcamp"} -{"bootcamp_name": "BbehDyckLanguages", "sample_number": 2000, "config_file": "BbehDyckLanguages", "bootcamp_cls_name": "BbehDyckLanguagesbootcamp"} -{"bootcamp_name": "korOperationUnicode2605", "sample_number": 1000, "config_file": "korOperationUnicode2605", "bootcamp_cls_name": "KorOperationUnicode2605bootcamp"} -{"bootcamp_name": "korLogicResolution", "sample_number": 1000, "config_file": "korLogicResolution", "bootcamp_cls_name": "KorLogicResolutionbootcamp"} -{"bootcamp_name": "korPuzzleCryptoMath", "sample_number": 1000, "config_file": "korPuzzleCryptoMath", "bootcamp_cls_name": "KorPuzzleCryptoMathbootcamp"} -{"bootcamp_name": "korPuzzleWordRootsAndAffixes", "sample_number": 1000, "config_file": "korPuzzleWordRootsAndAffixes", "bootcamp_cls_name": "KorPuzzleWordRootsAndAffixesbootcamp"} -{"bootcamp_name": "korPuzzleSkyscrapers", "sample_number": 1000, "config_file": "korPuzzleSkyscrapers", "bootcamp_cls_name": "KorPuzzleSkyscrapersbootcamp"} -{"bootcamp_name": "cryptomath", "sample_number": 2000, "config_file": "crypto_math", "bootcamp_cls_name": "Cryptomathbootcamp"} -{"bootcamp_name": "korLogicCanonicalPropositions", "sample_number": 1000, "config_file": "korLogicCanonicalPropositions", "bootcamp_cls_name": "KorLogicCanonicalPropositionsbootcamp"} -{"bootcamp_name": "korOperationUnicodeffe0", "sample_number": 1000, "config_file": "korOperationUnicodeffe0", "bootcamp_cls_name": "KorOperationUnicodeffe0bootcamp"} -{"bootcamp_name": "BbehWebOfLies", "sample_number": 1000, "config_file": "BbehWebOfLies", "bootcamp_cls_name": "BbehWebOfLiesbootcamp"} -{"bootcamp_name": "korLogicPropositionalLogicFormalization", "sample_number": 1000, "config_file": "korLogicPropositionalLogicFormalization", "bootcamp_cls_name": "KorLogicPropositionalLogicFormalizationbootcamp"} -{"bootcamp_name": "korLogicDefinitions", "sample_number": 1000, "config_file": "korLogicDefinitions", "bootcamp_cls_name": "KorLogicDefinitionsbootcamp"} -{"bootcamp_name": "minesweeper", "sample_number": 2000, "config_file": "minesweeper", "bootcamp_cls_name": "Minesweeperbootcamp"} -{"bootcamp_name": "BbehWordSorting", "sample_number": 800, "config_file": "BbehWordSorting", "bootcamp_cls_name": "BbehWordSortingbootcamp"} -{"bootcamp_name": "korLogicDerivativeReasoningOfPropositionalLogic", "sample_number": 1000, "config_file": "korLogicDerivativeReasoningOfPropositionalLogic", "bootcamp_cls_name": "KorLogicDerivativeReasoningOfPropositionalLogicbootcamp"} -{"bootcamp_name": "korOperationUnicode2295", "sample_number": 1000, "config_file": "korOperationUnicode2295", "bootcamp_cls_name": "KorOperationUnicode2295bootcamp"} -{"bootcamp_name": "bbehbooleanexpressions", "sample_number": 2000, "config_file": "bbeh_boolean_expressions", "bootcamp_cls_name": "Bbehbooleanexpressionsbootcamp"} -{"bootcamp_name": "starbattle", "sample_number": 2000, "config_file": "starbattle", "bootcamp_cls_name": "Starbattlebootcamp"} -{"bootcamp_name": "bbehobjectcounting", "sample_number": 2000, "config_file": "bbeh_object_counting", "bootcamp_cls_name": "Bbehobjectcountingbootcamp"} -{"bootcamp_name": "arrowmaze", "sample_number": 2000, "config_file": "arrowmaze", "bootcamp_cls_name": "Arrowmazebootcamp"} -{"bootcamp_name": "korPuzzleLogicPuzzle", "sample_number": 1000, "config_file": "korPuzzleLogicPuzzle", "bootcamp_cls_name": "KorPuzzleLogicPuzzlebootcamp"} -{"bootcamp_name": "sudoku", "sample_number": 2000, "config_file": "sudoku", "bootcamp_cls_name": "Sudokubootcamp"} -{"bootcamp_name": "arc", "sample_number": 10000, "config_file": "arc", "bootcamp_cls_name": "Arcbootcamp"} -{"bootcamp_name": "korOperationUnicode25a1", "sample_number": 1000, "config_file": "korOperationUnicode25a1", "bootcamp_cls_name": "KorOperationUnicode25a1bootcamp"} -{"bootcamp_name": "bbehshuffobject", "sample_number": 1000, "config_file": "bbeh_shuff_object", "bootcamp_cls_name": "Bbehshuffobjectbootcamp"} -{"bootcamp_name": "game24", "sample_number": 8000, "config_file": "game24", "bootcamp_cls_name": "Game24bootcamp"} -{"bootcamp_name": "BbehGeometricShapes", "sample_number": 2000, "config_file": "BbehGeometricShapes", "bootcamp_cls_name": "BbehGeometricShapesbootcamp"} -{"bootcamp_name": "korPuzzleKukurasu", "sample_number": 1000, "config_file": "korPuzzleKukurasu", "bootcamp_cls_name": "KorPuzzleKukurasubootcamp"} -{"bootcamp_name": "korPuzzleWordSearch", "sample_number": 1000, "config_file": "korPuzzleWordSearch", "bootcamp_cls_name": "KorPuzzleWordSearchbootcamp"} -{"bootcamp_name": "korLogicCooperativePrinciple", "sample_number": 1000, "config_file": "korLogicCooperativePrinciple", "bootcamp_cls_name": "KorLogicCooperativePrinciplebootcamp"} -{"bootcamp_name": "korPuzzleCalcudoko", "sample_number": 1000, "config_file": "korPuzzleCalcudoko", "bootcamp_cls_name": "KorPuzzleCalcudokobootcamp"} -{"bootcamp_name": "BbehMultistepArithmetic", "sample_number": 2000, "config_file": "BbehMultistepArithmetic", "bootcamp_cls_name": "BbehMultistepArithmeticbootcamp"} -{"bootcamp_name": "korLogicSpeechActs", "sample_number": 1000, "config_file": "korLogicSpeechActs", "bootcamp_cls_name": "KorLogicSpeechActsbootcamp"} -{"bootcamp_name": "korPuzzleWordLadder", "sample_number": 1000, "config_file": "korPuzzleWordLadder", "bootcamp_cls_name": "KorPuzzleWordLadderbootcamp"} -{"bootcamp_name": "korPuzzleConnectWords", "sample_number": 1000, "config_file": "korPuzzleConnectWords", "bootcamp_cls_name": "KorPuzzleConnectWordsbootcamp"} -{"bootcamp_name": "korLogicLogicalMethodsForExploringCauseAndEffectRelationships", "sample_number": 1000, "config_file": "korLogicLogicalMethodsForExploringCauseAndEffectRelationships", "bootcamp_cls_name": "KorLogicLogicalMethodsForExploringCauseAndEffectRelationshipsbootcamp"} -{"bootcamp_name": "korPuzzleArrowMaze", "sample_number": 1000, "config_file": "korPuzzleArrowMaze", "bootcamp_cls_name": "KorPuzzleArrowMazebootcamp"} -{"bootcamp_name": "korPuzzleWordBrainTeasers", "sample_number": 1000, "config_file": "korPuzzleWordBrainTeasers", "bootcamp_cls_name": "KorPuzzleWordBrainTeasersbootcamp"} -{"bootcamp_name": "LightUp", "sample_number": 2000, "config_file": "Light_Up", "bootcamp_cls_name": "LightUpbootcamp"} -{"bootcamp_name": "korOperationUnicode25bd", "sample_number": 1000, "config_file": "korOperationUnicode25bd", "bootcamp_cls_name": "KorOperationUnicode25bdbootcamp"} -{"bootcamp_name": "binairo", "sample_number": 2000, "config_file": "binairo", "bootcamp_cls_name": "Binairobootcamp"} -{"bootcamp_name": "korOperationUnicode25b3", "sample_number": 1000, "config_file": "korOperationUnicode25b3", "bootcamp_cls_name": "KorOperationUnicode25b3bootcamp"} -{"bootcamp_name": "korLogicFormalFallacies", "sample_number": 1000, "config_file": "korLogicFormalFallacies", "bootcamp_cls_name": "KorLogicFormalFallaciesbootcamp"} -{"bootcamp_name": "korOperationUnicode25cb", "sample_number": 1000, "config_file": "korOperationUnicode25cb", "bootcamp_cls_name": "KorOperationUnicode25cbbootcamp"} -{"bootcamp_name": "korOperationUnicodeffe1", "sample_number": 1000, "config_file": "korOperationUnicodeffe1", "bootcamp_cls_name": "KorOperationUnicodeffe1bootcamp"} -{"bootcamp_name": "korLogicTemporalPropositions", "sample_number": 1000, "config_file": "korLogicTemporalPropositions", "bootcamp_cls_name": "KorLogicTemporalPropositionsbootcamp"} -{"bootcamp_name": "korLogicEquivalenceCalculus", "sample_number": 1000, "config_file": "korLogicEquivalenceCalculus", "bootcamp_cls_name": "KorLogicEquivalenceCalculusbootcamp"} -{"bootcamp_name": "korLogicEpistemicLogic", "sample_number": 1000, "config_file": "korLogicEpistemicLogic", "bootcamp_cls_name": "KorLogicEpistemicLogicbootcamp"} -{"bootcamp_name": "maze", "sample_number": 2000, "config_file": "maze", "bootcamp_cls_name": "Mazebootcamp"} -{"bootcamp_name": "calcudoku", "sample_number": 2000, "config_file": "calcudoku", "bootcamp_cls_name": "Calcudokubootcamp"} -{"bootcamp_name": "aquarium", "sample_number": 2000, "config_file": "aquarium", "bootcamp_cls_name": "Aquariumbootcamp"} -{"bootcamp_name": "kakurasu", "sample_number": 2000, "config_file": "kakurasu", "bootcamp_cls_name": "Kakurasubootcamp"} -{"bootcamp_name": "korLogicTruthValueModalPropositions", "sample_number": 1000, "config_file": "korLogicTruthValueModalPropositions", "bootcamp_cls_name": "KorLogicTruthValueModalPropositionsbootcamp"} -{"bootcamp_name": "tents", "sample_number": 2000, "config_file": "tents", "bootcamp_cls_name": "Tentsbootcamp"} -{"bootcamp_name": "korLogicInductionParadox", "sample_number": 1000, "config_file": "korLogicInductionParadox", "bootcamp_cls_name": "KorLogicInductionParadoxbootcamp"} -{"bootcamp_name": "korPuzzleCampsite", "sample_number": 1000, "config_file": "korPuzzleCampsite", "bootcamp_cls_name": "KorPuzzleCampsitebootcamp"} -{"bootcamp_name": "korLogicAnalogicalReasoning", "sample_number": 1000, "config_file": "korLogicAnalogicalReasoning", "bootcamp_cls_name": "KorLogicAnalogicalReasoningbootcamp"} -{"bootcamp_name": "campsite", "sample_number": 2000, "config_file": "campsite", "bootcamp_cls_name": "Campsitebootcamp"} -{"bootcamp_name": "korOperationUnicode25ce", "sample_number": 1000, "config_file": "korOperationUnicode25ce", "bootcamp_cls_name": "KorOperationUnicode25cebootcamp"} -{"bootcamp_name": "dominosa", "sample_number": 2000, "config_file": "dominosa", "bootcamp_cls_name": "Dominosabootcamp"} -{"bootcamp_name": "korOperationUnicode20ac", "sample_number": 1000, "config_file": "korOperationUnicode20ac", "bootcamp_cls_name": "KorOperationUnicode20acbootcamp"} -{"bootcamp_name": "korLogicEnumerativeInductiveReasoning", "sample_number": 1000, "config_file": "korLogicEnumerativeInductiveReasoning", "bootcamp_cls_name": "KorLogicEnumerativeInductiveReasoningbootcamp"} -{"bootcamp_name": "korLogicPropositionalLogicConcepts", "sample_number": 1000, "config_file": "korLogicPropositionalLogicConcepts", "bootcamp_cls_name": "KorLogicPropositionalLogicConceptsbootcamp"} -{"bootcamp_name": "korOperationUnicode25cf", "sample_number": 1000, "config_file": "korOperationUnicode25cf", "bootcamp_cls_name": "KorOperationUnicode25cfbootcamp"} -{"bootcamp_name": "korLogicPredicateLogicFormalization", "sample_number": 1000, "config_file": "korLogicPredicateLogicFormalization", "bootcamp_cls_name": "KorLogicPredicateLogicFormalizationbootcamp"} -{"bootcamp_name": "galaxies", "sample_number": 2000, "config_file": "galaxies", "bootcamp_cls_name": "Galaxiesbootcamp"} -{"bootcamp_name": "korOperationUnicode25a0", "sample_number": 1000, "config_file": "korOperationUnicode25a0", "bootcamp_cls_name": "KorOperationUnicode25a0bootcamp"} -{"bootcamp_name": "BBEHHyperbaton", "sample_number": 1000, "config_file": "BBEHHyperbaton", "bootcamp_cls_name": "BBEHHyperbatonbootcamp"} +{"bootcamp_name": "earthtyphoon", "sample_number": 10000, "config_file": "earth_typhoon", "bootcamp_cls_name": "Earthtyphoonbootcamp"} + diff --git a/examples/pipelines/puzzle_configs/earth_typhoon_test.json b/examples/pipelines/puzzle_configs/earth_typhoon_test.json index 41d8eb1..369b3d9 100644 --- a/examples/pipelines/puzzle_configs/earth_typhoon_test.json +++ b/examples/pipelines/puzzle_configs/earth_typhoon_test.json @@ -1,13 +1,13 @@ [ { "v_range": [ - 0, + 1, 100 ] }, { "v_range": [ - 0, + 1, 90 ] }, diff --git a/examples/pipelines/puzzle_configs/earth_typhoon_train.json b/examples/pipelines/puzzle_configs/earth_typhoon_train.json index 41d8eb1..369b3d9 100644 --- a/examples/pipelines/puzzle_configs/earth_typhoon_train.json +++ b/examples/pipelines/puzzle_configs/earth_typhoon_train.json @@ -1,13 +1,13 @@ [ { "v_range": [ - 0, + 1, 100 ] }, { "v_range": [ - 0, + 1, 90 ] }, diff --git a/internbootcamp/bootcamp/__init__.py b/internbootcamp/bootcamp/__init__.py index 9c69795..2041d37 100755 --- a/internbootcamp/bootcamp/__init__.py +++ b/internbootcamp/bootcamp/__init__.py @@ -1095,4 +1095,5 @@ from .ddistinctpaths.ddistinctpaths import Ddistinctpathsbootcamp from .eereaderdisplay.eereaderdisplay import Eereaderdisplaybootcamp from .clunarnewyearandnumberdivision.clunarnewyearandnumberdivision import Clunarnewyearandnumberdivisionbootcamp from .med_calculator.med_calculator import Medcalculatorbootcamp -from .symbolic_regression.symbolic_regression import SymbolicRegressionbootcamp \ No newline at end of file +from .symbolic_regression.symbolic_regression import SymbolicRegressionbootcamp +from .earth_typhoon.earth_typhoon import Earthtyphoonbootcamp \ No newline at end of file diff --git a/internbootcamp/bootcamp/earth_typhoon/earth_typhoon.py b/internbootcamp/bootcamp/earth_typhoon/earth_typhoon.py index 5bff99e..91d423b 100644 --- a/internbootcamp/bootcamp/earth_typhoon/earth_typhoon.py +++ b/internbootcamp/bootcamp/earth_typhoon/earth_typhoon.py @@ -4,7 +4,51 @@ import numpy as np from internbootcamp.bootcamp.base import Basebootcamp -class earth_typhoon(Basebootcamp): +def last_boxed_only_string(string): + idx = string.rfind("\\boxed") + if "\\boxed " in string: + return "\\boxed " + string.split("\\boxed ")[-1].split("$")[0] + if idx < 0: + idx = string.rfind("\\fbox") + if idx < 0: + return None + + i = idx + right_brace_idx = None + num_left_braces_open = 0 + while i < len(string): + if string[i] == "{": + num_left_braces_open += 1 + if string[i] == "}": + num_left_braces_open -= 1 + if num_left_braces_open == 0: + right_brace_idx = i + break + i += 1 + + if right_brace_idx is None: + retval = None + else: + retval = string[idx:right_brace_idx + 1] + + return retval + + +def remove_boxed(s): + if "\\boxed " in s: + left = "\\boxed " + assert s[:len(left)] == left + return s[len(left):] + + left = "\\boxed{" + + assert s[:len(left)] == left + assert s[-1] == "}" + + return s[len(left):-1] + + +class Earthtyphoonbootcamp(Basebootcamp): def __init__( self, v_range=(0, 100), @@ -24,16 +68,18 @@ class earth_typhoon(Basebootcamp): v = identity["v"] return ( f"下面给出最大风速(v)={v} (kt)\n\n" - "请计算海平面气压,计算公式为:\n" - "风半径(单位是 Pa) mslp = 1021.36 - 0.36*v - (v/20.16)**2\n" - "只需返回 “mslp = ”。" + "请计算海平面气压(单位是 Pa),计算公式为:\n" + "mslp = 1021.36 - 0.36*v - (v/20.16)**2\n" + "请将最终计算结果放入\\boxed{}中,例如:\\boxed{1234.56}" ) @staticmethod def extract_output(output: str) -> str: # 用正则提取“mslp = …”右侧的表达式 - m = re.search(r"mslp\s*=\s*([^\n\r]+)", output) - return m.group(1).strip() if m else None + output = last_boxed_only_string(output) + if output is None: + return "" + return remove_boxed(output) @classmethod def _verify_correction(cls, solution: str, identity: dict) -> bool: @@ -45,30 +91,31 @@ class earth_typhoon(Basebootcamp): return False # print(c) # 验证 c ≈ k - return abs(c - identity["mslp"]) < 0.1 + if abs(c - identity["mslp"]) < 1e-2: + return 1 + return max(1 - abs(c - identity["mslp"]),0) if __name__ == "__main__": - bootcamp = earth_typhoon(seed=123) + bootcamp = Earthtyphoonbootcamp(seed=123) # 生成几个样例 examples = [bootcamp.case_generator() for _ in range(3)] print(examples) print(bootcamp.prompt_func(examples[0])) - print(bootcamp.extract_output("xxxxx relative mslp = 111222 ")) - solution = bootcamp.extract_output("xxxxx relative mslp = 984.35 ") - print(bootcamp._verify_correction(solution, examples[0])) - solution = bootcamp.extract_output("xxxxx relative mslp = 985.35 ") - print(bootcamp._verify_correction(solution, examples[0])) + solution = bootcamp.extract_output("xxxxx relative mslp = \\boxed{984.35},that is true ") + print(solution ,bootcamp._verify_correction(solution, examples[0])) + solution = bootcamp.extract_output("xxxxx relative mslp = \\boxed{985.35}, haha ") + print(solution, bootcamp._verify_correction(solution, examples[0])) - for identity in examples: - # 构造“模型”返回答案,模拟 LLM 的输出 - humidity = identity["r"] - sol = f"{humidity:.4f}" - # 调用 Basebootcamp 提供的 verify_score 接口进行验证 - score = bootcamp.verify_score(sol, identity, short_threshold=1e-2) - # 打印结果 - print(json.dumps({ - "identity": identity, - "solution": sol, - "verify_score": score - }, ensure_ascii=False, indent=2)) \ No newline at end of file + # for identity in examples: + # # 构造“模型”返回答案,模拟 LLM 的输出 + # humidity = identity["v"] + # sol = f"{humidity:.4f}" + # # 调用 Basebootcamp 提供的 verify_score 接口进行验证 + # score = bootcamp.verify_score(sol, identity, short_threshold=1e-2) + # # 打印结果 + # print(json.dumps({ + # "identity": identity, + # "solution": sol, + # "verify_score": score + # }, ensure_ascii=False, indent=2)) \ No newline at end of file