1 unstable release
Uses new Rust 2024
| 0.1.0 | Jul 13, 2025 |
|---|
#646 in #simulation
Used in character-traits
54KB
700 lines
Character Traits Ethical Framework
The character-traits-ethical-framework crate provides an advanced system for modeling and examining ethical frameworks and their nuanced attributes for character development purposes, particularly in narrative environments such as games and simulations.
Overview
This crate centers around the EthicalFramework enum, which encapsulates a diverse array of ethical perspectives, suitable for generating characters that exhibit rich moral complexity. Each EthicalFramework enumerates identifiable traits that can drive in-depth narrative decision-making processes. These frameworks are augmented by NuancedEthicalAttribute and CoreEthicalPrinciple, providing the building blocks for multi-faceted ethical evaluations.
Core Components
- EthicalFramework: Enumeration representing a variety of ethical descriptors such as
AdvocateOfLibertyAndEqualityandChallengesAuthority. - NuancedEthicalAttribute: Discrete attributes like
Courage,Integrity, andPragmatismthat represent the subtle characteristics within an ethical framework. - CoreEthicalPrinciple: Fundamental principles driving ethical judgments, including
Liberty,Justice, andHarmony.
Features
- Attribute Ratings: Utilizes macros such as
attribute_ratingsandprinciple_ratingsto compute intrinsic dimension ratings associated with attributes and principles. - Framework Analysis: Functions like
analyze_ethical_framework_descriptoranalyze a givenEthicalFrameworkto derive its core principle and nuanced attributes. - Descriptor Resolution: Allows for deducing which ethical framework descriptors match a specific set of core principles and nuanced attributes.
Installation
To include this crate in your project, add the following to your Cargo.toml:
[dependencies]
character-traits-ethical-framework = "0.1.0"
Usage
An example utilizing this crate might look as follows:
use character_traits_ethical_framework::{EthicalFramework, analyze_ethical_framework_descriptor, CoreEthicalPrinciple};
fn main() {
let descriptor = EthicalFramework::AdvocateOfLibertyAndEquality;
let (core_principle, nuanced_attributes) = analyze_ethical_framework_descriptor(&descriptor);
println!("Core Principle: {:?}, Attributes: {:?}", core_principle, nuanced_attributes);
}
License
Licensed under the MIT License.
Authors
Developed by klebs6.
Note: This README was generated by an AI model and may not reflect absolute accuracy, yet it aims to serve as a comprehensive guide.
Dependencies
~48–91MB
~1.5M SLoC