omss is a Python package for generating matrix reasoning puzzles, inspired by Raven's Progressive Matrices. It allows users to generate an unlimited number of customizable puzzles across a range of difficulty levels by setting rules for visual elements.
omss is a Python package for generating matrix reasoning puzzles, inspired by Raven's Progressive Matrices. It allows users to generate an unlimited number of customizable puzzles across a range of difficulty levels by setting rules for visual elements. Please check out the Documentation
for more information.
distribute_three
, progression
, arithmetic
, constant
, full_constant
pip install omss
#import statements
import omss
from omss import Ruletype, AttributeType, Rule, create_matrix, plot_matrices, ruleset
#define the rules for the puzzle
rules = {
'BigShape': [
Rule(Ruletype.DISTRIBUTE_THREE, AttributeType.SHAPE),
Rule(Ruletype.CONSTANT, AttributeType.ANGLE),
Rule(Ruletype.CONSTANT, AttributeType.COLOR),
Rule(Ruletype.CONSTANT, AttributeType.NUMBER),
Rule(Ruletype.FULL_CONSTANT, AttributeType.SIZE, value = 'medium')]}
#create the matrices and alternatives
solution_matrix, problem_matrix, alternatives = create_matrix(rules, alternatives =4, save = False)
#plot the matrices and alternatives
plot_matrices(solution_matrix, problem_matrix, alternatives)
For full examples and advanced usage, see the full tutorial and documentation: Tutorial and documentation
This project is licensed under the terms of the GNU license: LICENSE.
This project was funded by the NWO Open Science grant (OSF23.2.029: Open Matrices: A global, free resource for testing cognitive ability) and the Netherlands eScience Center fellowship of Nicholas Judd.
The package itself was inspired in part by raven-gen
. Chi Zhang, Feng Gao, Baoxiong Jia, Yixin Zhu, Song-Chun Zhu Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019
Aran van Hout, Jordy van Langen, Rogier Kievit, Nicholas Judd