Open Matrices Stimulus Set (omss)

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.

4
contributors
Get started
206 commitsLast commit ≈ 2 days ago0 stars0 forks

Description

PyPi Downloads

Open Matrices Stimulus Set (omss)

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.

Features

  • Customizable matrix reasoning puzzle generation
  • Reproducibility with seed control
  • Colorblind-friendly visual design
  • 5 different rules: distribute_three, progression, arithmetic, constant, full_constant
  • Generate virtually unlimited unique puzzle variations
  • Includes ~80 predefined rulesets across 6 difficulty levels, each of which can produce a huge variety of distinct puzzles

             

Installation

pip install omss

Quick start

#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)

                 

       

Documentation

For full examples and advanced usage, see the full tutorial and documentation: Tutorial and documentation

License

This project is licensed under the terms of the GNU license: LICENSE.

Acknowledgements

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

Logo of Open Matrices Stimulus Set (omss)
Keywords
Programming language
  • Python 100%
License
</>Source code

Participating organisations

Donders Institute
Netherlands eScience Center
Stockholm University
Swedish Collegium for Advanced Study

Contributors

AvH
Aran van Hout
Donders - Radboud UMC
JvL
Jordy van Langen
RK
Rogier Kievit
PI
Radboud Universiteit Donders Institute for Brain Cognition and Behaviour