@@ -54,6 +54,31 @@ Implicit constructor for $(FUNCTIONNAME).
54
54
ability_tracker:: AbilityTrackerT = NullAbilityTracker ()
55
55
end
56
56
57
+ function CatRules (bits... )
58
+ ability_estimator, ability_tracker = _find_ability_estimator_and_tracker (bits... )
59
+ if ability_estimator === nothing
60
+ error (" Could not find an ability estimator in $(bits) " )
61
+ end
62
+ if ability_tracker === nothing
63
+ error (" Could not find an ability tracker in $(bits) " )
64
+ end
65
+ next_item = NextItemRule (bits... ,
66
+ ability_estimator = ability_estimator,
67
+ ability_tracker = ability_tracker)
68
+ if next_item === nothing
69
+ error (" Could not find a next item rule in $(bits) " )
70
+ end
71
+ termination_condition = TerminationCondition (bits... )
72
+ if termination_condition === nothing
73
+ error (" Could not find a termination condition in $(bits) " )
74
+ end
75
+ CatRules (;
76
+ next_item = next_item,
77
+ termination_condition = termination_condition,
78
+ ability_estimator = ability_estimator,
79
+ ability_tracker = collect_trackers (next_item, ability_tracker))
80
+ end
81
+
57
82
function _find_ability_estimator_and_tracker (bits... )
58
83
ability_estimator = AbilityEstimator (bits... )
59
84
ability_tracker = AbilityTracker (bits... ; ability_estimator = ability_estimator)
@@ -88,31 +113,6 @@ function collect_trackers(next_item_rule::NextItemRule, ability_tracker::Ability
88
113
end
89
114
end
90
115
91
- function CatRules (bits... )
92
- ability_estimator, ability_tracker = _find_ability_estimator_and_tracker (bits... )
93
- if ability_estimator === nothing
94
- error (" Could not find an ability estimator in $(bits) " )
95
- end
96
- if ability_tracker === nothing
97
- error (" Could not find an ability tracker in $(bits) " )
98
- end
99
- next_item = NextItemRule (bits... ,
100
- ability_estimator = ability_estimator,
101
- ability_tracker = ability_tracker)
102
- if next_item === nothing
103
- error (" Could not find a next item rule in $(bits) " )
104
- end
105
- termination_condition = TerminationCondition (bits... )
106
- if termination_condition === nothing
107
- error (" Could not find a termination condition in $(bits) " )
108
- end
109
- CatRules (;
110
- next_item = next_item,
111
- termination_condition = termination_condition,
112
- ability_estimator = ability_estimator,
113
- ability_tracker = collect_trackers (next_item, ability_tracker))
114
- end
115
-
116
116
"""
117
117
Configuration for a simulatable CAT.
118
118
"""
0 commit comments