Skip to content

Releases: tgies/megahal-rs

megahal-cli-v0.3.1

30 May 08:11

Choose a tag to compare

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

28 May 19:40
8188df8

Choose a tag to compare

Added

  • add C MegaHAL v8 .brn import (#3)

Fixed

  • compatibility with rand 0.10.1

megahal-cli-v0.2.0

22 May 18:55
7cdfbd3

Choose a tag to compare

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_reader for
    in-memory brain serialization without filesystem I/O.
  • MegaHal::train_from_reader for training from any BufRead source.
  • MegaHal::generate: a no-learn variant of respond.
  • MegaHal::set_fallback_reply / set_fallback_greeting for replacing
    the hardcoded "I don't know enough..." and "Hello!" messages.
  • MegaHalError for reader and writer errors.
  • megahal-cli crate with cargo install megahal-cli for the megahal
    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-learn generate with a tight iteration budget),
    and brain_persist (save/load via reader/writer).

Changed

  • Renamed the markov-chain crate to megahal-markov. The name
    markov-chain is held on crates.io by an unrelated 2017 crate.
  • SymbolId's tuple-struct field is no longer public; construct via
    SymbolId::new(value). The symbol-core crate's API is documented as
    unstable; consumers should depend on the megahal facade.
  • Expanded the megahal crate-level rustdoc with an API tour, concepts
    section, brain-file format note, and a recipe for shipping a
    pre-trained brain via include_bytes!.
  • Running megahal without --brain now defaults to persisting the brain
    to the user's data directory instead of running with no persistence.
  • MegaHal::train_from_file now 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

  • capitalize no longer upper-cases the letter after a !/./? when
    no whitespace follows (e.g. a.b.c now correctly produces A.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.
  • babble no longer panics when a context node's usage count is zero;
    treats that case as sentence-terminating.

v0.1.0

18 Feb 04:24
v0.1.0
011c9be

Choose a tag to compare

0.1.0