citoolkit.improvisers package¶
Submodules¶
citoolkit.improvisers.classic_ci module¶
Contains the ClassicCI class, which acts as an improviser for the Classic CI problem.
- class citoolkit.improvisers.classic_ci.ClassicCI(hard_constraint, soft_constraint, length_bounds, epsilon, prob_bounds)[source]¶
Bases:
citoolkit.improvisers.improviser.ImproviserAn improviser for the “Control Improvisation” problem.
- Parameters
hard_constraint (Spec) – A specification that must accept all improvisations
soft_constraint (Spec) – A specification that must accept improvisations with probability 1 - epsilon.
length_bounds (Tuple[int, int]) – A tuple containing lower and upper bounds on the length of a generated word.
epsilon (float) – The allowed tolerance with which we can not satisfy the soft constraint.
prob_bounds (Tuple[float, float]) – A tuple containing lower and upper bounds on the probability with which we can generate a word.
- Raises
ValueError – If passed parameters are not of the correct type.
InfeasibleImproviserError – If the resulting improvisation problem is not feasible.
- Return type
None
citoolkit.improvisers.improviser module¶
Contains the Improviser class, from which all CI improvisers should inherit.
- class citoolkit.improvisers.improviser.Improviser[source]¶
Bases:
objectThe Improviser class is a parent class to all CI improvisers.