Releases: kach/memo
Releases · kach/memo
memo 0.4.1
memo 0.4.0 ("memo-o-lantern")
(See announcement on memo-lang mailing list.)
memo 0.3.1
Includes a little patch to make something possible for @maxkw. :)
memo 0.3.0 ("SepteMEMOber")
(See update on mailing list.)
for zenodo
This is only to produce a zenodo DOI.
memo 0.2.0 "August"
Upgrade with: pip install memo-lang --upgrade
Breaking changes
- Output dimensions now appear in the same order as specified the
@memo
definition (previously they were reversed). The easiest way to transition your existing memo code is to.transpose()
the output array produced by each memo.
Performance 🐎
- memo has a brand-new compilation strategy that produces code that is orders of magnitude faster, and dramatically more memory-efficient as well, especially for deeply nested recursive calls (e.g. when performing many rounds of value iteration).
New comforts 🕹️
- You can now use
Pr[…]
to measure probabilities (previously you had to useE[…]
which may be unintuitive).Pr
is simply syntactic sugar forE
. - There are several new helpful error messages: forgetting to put type annotations, forgetting to use the choice in wpp=…, etc.
- Error messages now also include your current memo version.
- The "cast" statement is now optional.
- You can now pass in multiple variables to
knows
, as inalice: knows(x, y, z, …)
. Previously those had to be separateknows
statements.
New features 🎁
- memo now has a little library for helping define complicated domains — similar to Python's namedtuple, but internally representing cartesian products as a flattened index from 0 to N. This is useful, e.g., if you want a grid-world state space S that has an X and Y component: memo now automatically does the tricky indexing arithmetic to convert (x, y) to and from (y * width + x).
Upcoming features 👾
- memo now has a small experimental library to compile your memo to a little "comic book" diagram that shows the different "frames of mind," and the variables defined in each such "frame." This can be helpful for producing figures for a paper/talk, as well as for debugging/better understanding your own models. This feature is very rough right now but expect it to improve during the 0.2.x series.
For developers 🛠️
- memo now supports a few internal debugging flags:
- You can use
@memo(debug_print_compiled=True)
to print the compiled source code produced internally by memo. - The flag
debug_trace=True
prints a note every time a memo is invoked. This is useful for debugging performance bottlenecks with recursive queries. - Finally,
save_comic=(path)
triggers the WIP comic generator.
- You can use
For memo hackathon @ CogSci
v0.1.3 move demo-grid.wppl to demo/