Skip to main content

Python package for generating customizable matrix reasoning puzzles, inspired by Raven Progressive Matrices

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omss-0.1.0.tar.gz (72.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omss-0.1.0-py3-none-any.whl (62.6 kB view details)

Uploaded Python 3

File details

Details for the file omss-0.1.0.tar.gz.

File metadata

  • Download URL: omss-0.1.0.tar.gz
  • Upload date:
  • Size: 72.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for omss-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e0c2382555c54a65714cd796396f6b5412b61996c95b2a8f8c2ef75f015fc03
MD5 55ac8ba10d6c04cf1cf566741e68e9e6
BLAKE2b-256 ed15ac0c1296e8674181c9770db2c474cd12ce5e5cf2b15f8e67807f8f5b560d

See more details on using hashes here.

File details

Details for the file omss-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: omss-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for omss-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c523a67fafff8c69595b25cb10b54d903d04b441f4410739fdefac6c1fa17ce7
MD5 9674eb9e66db177918b0573d067db394
BLAKE2b-256 e1ac38439f6b5601a5d75229fc0e1282d308fb273a42da36e346cf5c9c74049e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page