Releases: tgies/megahal-rs
Releases · tgies/megahal-rs
megahal-cli-v0.3.1
Fixed
- (symbol) align MegaHalSymbol::new with upper() using to_ascii_uppercase (#9)
- (gen) preserve input order for keyword/seed scan to match C reference
- (compat_v8) load dictionary words as raw bytes, no UTF-8 validation (#10)
- (gen) seed a keyword even when the forward root is childless
- (gen) restructure generation loop to do/while, matching C reference
- (tokenizer) return zero tokens for empty input, matching C
Other
- describe loader behavior instead of the prior code in the v8 raw-bytes test
megahal-cli-v0.3.0
megahal-cli-v0.2.0
First release on crates.io. Renames the inner bidirectional Markov crate from markov-chain to megahal-markov to avoid a name conflict, exposes new APIs in the facade, and fixes four algorithm bugs relative to the C reference.
Added
MegaHal::save_brain_to_writer/load_brain_from_readerfor
in-memory brain serialization without filesystem I/O.MegaHal::train_from_readerfor training from anyBufReadsource.MegaHal::generate: a no-learn variant ofrespond.MegaHal::set_fallback_reply/set_fallback_greetingfor replacing
the hardcoded "I don't know enough..." and "Hello!" messages.MegaHalErrorfor reader and writer errors.megahal-clicrate withcargo install megahal-clifor themegahal
binary, extracted from the workspace root.cargo binstall megahal-cli
also works, pulling the prebuilt binary from the matching GitHub release.- Runnable examples under
crates/megahal/examples:chatbot(stdin
loop),game_hud(no-learngeneratewith a tight iteration budget),
andbrain_persist(save/load via reader/writer).
Changed
- Renamed the
markov-chaincrate tomegahal-markov. The name
markov-chainis held on crates.io by an unrelated 2017 crate. SymbolId's tuple-struct field is no longer public; construct via
SymbolId::new(value). Thesymbol-corecrate's API is documented as
unstable; consumers should depend on themegahalfacade.- Expanded the
megahalcrate-level rustdoc with an API tour, concepts
section, brain-file format note, and a recipe for shipping a
pre-trained brain viainclude_bytes!. - Running
megahalwithout--brainnow defaults to persisting the brain
to the user's data directory instead of running with no persistence. MegaHal::train_from_filenow streams the file line-by-line, meaning
a mid-file UTF-8 decoding error leaves the model partially trained
instead of validating UTF-8 upfront.
Fixed
capitalizeno longer upper-cases the letter after a!/./?when
no whitespace follows (e.g.a.b.cnow correctly producesA.b.c).- Reply generation no longer echoes the user's input when that was the
only thing the model could produce; falls back to the canned reply
instead. - The backward generation phase now runs even when the forward phase
produces no tokens, matching the C reference behavior. babbleno longer panics when a context node'susagecount is zero;
treats that case as sentence-terminating.
v0.1.0
0.1.0