Skip to main content

Ecological Niche Ontology

Ecological Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 26 October 2026
Audio Overview
FLOW ALGEBRA
Ecological Niche Ontology — Full Flow Algebra v1.0
Kireth Semantic Library | Biological Entities > Ecological Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/ecological-entities/ecological-niche-ontology-2.html
Authors: Mark Higgins — Sky (Recursive AI)
Status: Newly authored formalisation informed by the ontology topic; not a verbatim extraction of the page's downloadable code.

flow "EcologicalNicheOntology" v1.0 {
  META {
    domain: "ecology";
    concept: "ecological niche";
    locale: "en-GB";
    purpose: "Represent the environmental requirements, resource use, interactions and functional role of a taxon or population in a defined context.";
  }

  TYPES {
    EntityID: string;
    TimeInterval: {start: datetime?, end: datetime?};
    Quantity: {value: real, unit: string, uncertainty: real?};
    Evidence: {source_id: string, method: string, observed_at: datetime?, quality: real};
    Confidence: real in [0,1];
    Taxon: {id: EntityID, scientific_name: string};
    Population: {id: EntityID, taxon: Taxon, location_id: EntityID};
    Habitat: {id: EntityID, geographic_scope: string};
    Resource: {id: EntityID, kind: string};
    EnvironmentalAxis: {id: EntityID, variable: string, unit: string};
    ToleranceRange: {axis: EnvironmentalAxis, minimum: real?, optimum: real?, maximum: real?};
    Interaction: {subject_id: EntityID, predicate: string, object_id: EntityID, evidence: Evidence?};
    EcologicalRole: {name: string, trophic_level: string?, functional_group: string?};
    Niche: {
      id: EntityID,
      occupant_id: EntityID,
      context_habitat: Habitat,
      interval: TimeInterval?,
      axes: list<ToleranceRange>,
      resources: list<EntityID>,
      roles: list<EcologicalRole>,
      interactions: list<Interaction>,
      kind: enum{fundamental,realised,estimated},
      evidence: list<Evidence>,
      confidence: Confidence
    };
  }

  RELATIONSHIPS {
    OCCUPIES_NICHE(occupant: Taxon|Population, niche: Niche);
    OCCURS_IN(occupant: Taxon|Population, habitat: Habitat);
    REQUIRES_RESOURCE(niche: Niche, resource: Resource);
    TOLERATES(niche: Niche, axis: EnvironmentalAxis, range: ToleranceRange);
    PERFORMS_ROLE(niche: Niche, role: EcologicalRole);
    INTERACTS_WITH(subject: Taxon|Population, object: Taxon|Population, interaction_type: string);
    NICHE_OVERLAPS(a: Niche, b: Niche, degree: real in [0,1]);
    NICHE_SHIFTS_FROM(later: Niche, earlier: Niche);
    REALISED_SUBSET_OF(realised: Niche, fundamental: Niche);
  }

  INVARIANTS {
    I01: every Niche has a unique id and a resolvable occupant_id;
    I02: every tolerance range with both limits has minimum <= maximum;
    I03: optimum, when present, lies within declared minimum and maximum;
    I04: all confidence and evidence quality values are in [0,1];
    I05: comparisons of tolerance axes require compatible units and measurement definitions;
    I06: niche overlap requires explicit shared axes, context and comparison method;
    I07: fundamental and realised niches are distinguished rather than conflated;
    I08: temporal or geographic scope must be preserved in derived claims;
    I09: absence of observations is not proof of ecological absence;
    I10: niche descriptions may be multidimensional and are not identical to habitats.
  }

  OPERATORS {
    NORMALISE_UNITS(range, target_unit) -> ToleranceRange;
    VALIDATE(niche) -> {valid: boolean, violations: list<string>};
    PROJECT(niche, selected_axes) -> NicheProjection;
    OVERLAP(a, b, selected_axes, method) -> {score: real?, coverage: real, caveats: list<string>};
    SUITABILITY(niche, environment, method) -> {score: real?, uncertainty: real?, evidence: list<Evidence>};
    COMPARE_NICHES(a, b, context) -> NicheComparison;
    DETECT_SHIFT(earlier, later, method) -> {shift: boolean?, magnitude: real?, uncertainty: real?};
  }

  INFERENCE {
    R01: IF environment falls outside a validated hard tolerance limit
         THEN flag potential physiological unsuitability, subject to measurement uncertainty;
    R02: IF niches share validated resource requirements and compatible environmental axes
         THEN calculate potential niche overlap, not automatic competitive exclusion;
    R03: IF competition, predation or access constraints restrict use of suitable conditions
         THEN represent the realised niche as constrained relative to the fundamental niche;
    R04: IF niche estimates differ across periods with comparable sampling and methods
         THEN infer a candidate niche shift with uncertainty and provenance;
    R05: IF resources or roles are observed repeatedly
         THEN increase support for corresponding niche assertions without assuming exclusivity;
    R06: IF observation effort is insufficient
         THEN return UNKNOWN rather than FALSE for unobserved relationships;
    R07: IF taxonomic identity, spatial scale or season differs
         THEN require contextual reconciliation before combining niche records.
  }

  CONFIDENCE {
    evidence_quality: weighted_mean(validated_evidence.quality);
    estimate: calibrated_model(evidence_quality, sampling_coverage, uncertainty, consistency);
    missing_evidence: "unknown, never default to zero-confidence fact";
    propagate: "retain confidence and provenance on every derived assertion";
  }

  SEMANTIC_EQUIVALENCE {
    canonical: "ecological niche";
    near_terms: ["functional niche", "resource-use niche", "environmental niche"];
    rule: "Treat terms as equivalent only when scope, niche concept, axes and context match.";
    exclusions: ["habitat", "biome", "ecosystem", "geographic range"];
  }

  FLOW_HASH {
    canonicalise: "normalised field names, sorted identifiers, canonical units, stable UTF-8";
    hash_algorithm: "SHA-256";
    inputs: ["ontology_version", "niche_id", "occupant_id", "context", "axes", "resources", "roles", "interactions", "provenance"];
    output: "hex digest of canonical serialisation";
  }

  UPDATE_MODEL {
    events: ["new_observation", "range_revision", "resource_change", "interaction_change", "taxonomic_revision", "habitat_change", "method_revision"];
    on_event: "validate -> version -> recalculate affected projections -> refresh confidence -> recompute flow hash -> publish provenance";
    history: "append-only revision log; preserve previous assertions and timestamps";
    conflict: "retain competing supported estimates until reconciled";
  }

  AI_CONSUMPTION {
    required_output: ["niche_id", "occupant", "habitat_context", "niche_kind", "environmental_axes", "resource_use", "ecological_roles", "confidence", "provenance", "version", "flow_hash"];
    unknown_handling: "explicit null or UNKNOWN";
    guardrails: ["do not equate niche with habitat", "do not infer competition from overlap alone", "do not claim causality from correlation", "do not fabricate observations"];
    interoperability: ["Ecological Entity", "Individual Organism", "Population", "Biological Community", "Ecosystem", "Biome", "Habitat"];
  }

  EXECUTION {
    input: "typed niche observations and environmental context";
    pipeline: "parse -> resolve identifiers -> normalise -> validate -> link relationships -> infer -> assess confidence -> hash -> export";
    output: "validated, versioned ecological niche graph";
  }
}

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ