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
Metadata
Release files for omss 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| omss-0.1.0.tar.gz | 72.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| omss-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 135.0 kB
Release files / omss-0.1.0.tar.gz
| Download URL | omss-0.1.0.tar.gz |
|---|---|
| Size | 72.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e0c2382555c54a65714cd796396f6b5412b61996c95b2a8f8c2ef75f015fc03
|
|
BLAKE2b-256 checksum How to use checksums |
ed15ac0c1296e8674181c9770db2c474cd12ce5e5cf2b15f8e67807f8f5b560d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / omss-0.1.0-py3-none-any.whl
| Download URL | omss-0.1.0-py3-none-any.whl |
|---|---|
| Size | 62.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c523a67fafff8c69595b25cb10b54d903d04b441f4410739fdefac6c1fa17ce7
|
|
BLAKE2b-256 checksum How to use checksums |
e1ac38439f6b5601a5d75229fc0e1282d308fb273a42da36e346cf5c9c74049e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|