capability-grower-configuration

Crates.iocapability-grower-configuration
lib.rscapability-grower-configuration
version0.1.0
created_at2025-07-13 11:53:41.443905+00
updated_at2025-07-13 11:53:41.443905+00
descriptionA Rust crate to configure skill tree growth with capabilities for complexity management, tree expansion policies, capstone node handling, and error management.
homepage
repository
max_upload_size
id1750394
size432,624
(klebs6)

documentation

README

capability-grower-configuration

The capability-grower-configuration crate provides a versatile system for configuring the growth and expansion policies of skill trees. This is particularly useful for applications involving hierarchical layouts of skills, abilities, or knowledge concepts. The crate essentially allows the user to describe how a skill tree ought to be expanded and sorted, featuring granular configurability options and error handling mechanisms.

Features

  • Capstone Nodes: Control the generation of capstone nodes using CapstoneMode, which can be Off, Single, or Probabilistic.
  • Complexity Management: Set the desired tree complexity via ConfigurationComplexity to handle simple to complex configurations.
  • Tree Expansion Policies: Choose from multiple tree expansion strategies including Simple, Weighted, DepthBased, AlwaysAggregate, and custom scripting support.
  • Level-Specific Configuration: Specify overrides for tree level breadth and density.
  • Ordering Policies: Control the sorting of sub-branches with various SubBranchOrdering options.

Structs & Enums

  • CapstoneMode: Determines how capstone nodes are handled, ranging from none to probabilistic modes.
  • ConfigurationComplexity: Manages complexity versus usability, offering Simple, Balanced, and Complex variants.
  • TreeExpansionPolicy: Indicates strategy for node type selection in tree growth.
  • WeightedNodeVariantPolicy: Uses weights for random node variant selection.

Configuration & Errors

The crate provides structures for error handling, such as GrowerTreeConfigurationError for validating configurations. Errors include validation constraints like depth, breadth, or density violations.

Usage

The configuration allows for complex tree-structural settings, aiding in dynamic layout generation for various application domains. Utilize the builder pattern to craft configurations and leverage the rich suite of validation functions to ensure correctness.

Example

use capability_grower_configuration::{GrowerTreeConfiguration, CapstoneMode};

let config = GrowerTreeConfiguration::base_config(3, 5, 2)
    .with_level_specific(vec![3, 4, 5], vec![2, 2, 2])
    .with_capstone(CapstoneMode::Single, 0.1);

// Validate and utilize configuration
match config.validate() {
    Ok(_) => println!("Configuration is valid."),
    Err(e) => println!("Configuration error: {:?}", e),
}

Note: This README.md was generated by an AI model and may not be 100% accurate, however, it should be pretty good.

Commit count: 0

cargo fmt