Skip to main content

Crate encounter_argumentation

Crate encounter_argumentation 

Source
Expand description

Bridge between encounter social interactions and argumentation schemes.

Provides formal argument resolution for encounter’s social interaction engine, using Walton argumentation schemes evaluated via ASPIC+ and Dung extension semantics.

§Quick example — pairwise resolver (v0.1.x; still supported)

use argumentation_schemes::catalog::default_catalog;
use argumentation_schemes::instantiate;
use encounter_argumentation::resolver::{resolve_argument, ArgumentOutcome};

let registry = default_catalog();
let expert = registry.by_key("argument_from_expert_opinion").unwrap();
let instance = instantiate(expert, &[
    ("expert".into(), "alice".into()),
    ("domain".into(), "military".into()),
    ("claim".into(), "fortify_east".into()),
].into_iter().collect()).unwrap();

let outcome = resolve_argument(&[instance], &[], &registry);
assert!(matches!(outcome, ArgumentOutcome::ProposerWins { .. }));

§Quick example — state API (v0.2.0)

The new EncounterArgumentationState unifies scheme reasoning, bipolar graph structure, weighted attack strengths, and a tunable scene-intensity budget:

use argumentation_schemes::catalog::default_catalog;
use argumentation_weighted::types::Budget;
use encounter_argumentation::{ArgumentId, EncounterArgumentationState};

let registry = default_catalog();
let expert = registry.by_key("argument_from_expert_opinion").unwrap();
let instance = expert.instantiate(&[
    ("expert".into(), "alice".into()),
    ("domain".into(), "military".into()),
    ("claim".into(), "fortify_east".into()),
].into_iter().collect()).unwrap();

let mut state = EncounterArgumentationState::new(registry)
    .at_intensity(Budget::new(0.4).unwrap());
let alice_arg = state.add_scheme_instance("alice", instance);
state
    .add_weighted_attack(&ArgumentId::new("bob_counter"), &alice_arg, 0.3)
    .unwrap();

// At β=0.4 > 0.3 the attack is tolerated: alice's claim is accepted.
assert!(state.is_credulously_accepted(&alice_arg).unwrap());

Re-exports§

pub use acceptance::ArgumentAcceptanceEval;
pub use affordance_key::AffordanceKey;
pub use arg_id::ArgumentId;
pub use critical_moves::cq_to_beat;
pub use critical_moves::critical_question_beats;
pub use error::Error;
pub use knowledge::ArgumentKnowledge;
pub use knowledge::ArgumentPosition;
pub use knowledge::StaticKnowledge;
pub use resolver::ArgumentOutcome;
pub use resolver::resolve_argument;
pub use scoring::SchemeActionScorer;
pub use state::EncounterArgumentationState;
pub use state_acceptance::StateAcceptanceEval;
pub use state_scorer::StateActionScorer;
pub use value_argument::scheme_value_argument;

Modules§

acceptance
Argument-backed acceptance evaluation.
affordance_key
Canonical key for an (actor, affordance_name, bindings) triple used to index scheme instances against encounter affordances.
arg_id
ArgumentId: the identifier type for argument nodes in the encounter-level weighted bipolar framework.
critical_moves
Maps critical questions to encounter beat candidates.
error
Error types for encounter-argumentation operations. Error types for encounter-argumentation bridge operations.
knowledge
Trait for providing per-character argumentation capabilities.
resolver
Core argument resolution via ASPIC+ extension semantics.
scoring
Scheme-strength action scoring.
state
EncounterArgumentationState: the encounter-level state object composing schemes + bipolar + weighted + weighted-bipolar.
state_acceptance
StateAcceptanceEval: encounter’s AcceptanceEval impl backed by an EncounterArgumentationState’s current β-intensity.
state_scorer
StateActionScorer: encounter’s ActionScorer impl backed by an EncounterArgumentationState.
value_argument
Scheme-backed value argument resolution.