UNPKG

agents-flow

Version:

Framework for multi-agent interactive fiction videogame.

82 lines 2.67 kB
import { Aspect, Likes } from "npc-aspect"; import { RelationSet } from "npc-relations"; import { Individual, LogicAgent, TruthTable } from "first-order-logic"; import { IEmotional } from "npc-emotional"; import { Happiness, Personality } from "npc-mind"; export declare type PassTurn = (turn: number, agent: Agent) => string; export declare class Agent implements IEmotional { private _name; private _aspect; private _likes; private _relations; private _happiness; private _personality; private _isHuman; private _characteristics; private _desires; private _onTurnPassed; private _logic; private _isActive; constructor(name: string, aspect: Aspect, relations: RelationSet, happiness: Happiness, personality: Personality, likes: Likes, characteristics: string[], human: boolean, onTurnPassed?: PassTurn); get Name(): string; get Aspect(): Aspect; get Likes(): Likes; get Relations(): RelationSet; get Happiness(): Happiness; get Personality(): Personality; get IsHuman(): boolean; get Characteristics(): Characteristics; get Desires(): Desires; get IsActive(): boolean; get OnTurnPassed(): PassTurn; get Individual(): Individual; get logic(): LogicAgent; say(content: string): string; activate(): void; deactivate(): void; humanize(): void; dehumanize(): void; copy(): Agent; passTurn(turn: number): string; } export declare class Crowd { private _crowd; constructor(agents: Agent[]); get all(): Agent[]; get(name: string): Agent; copy(): Crowd; } export declare type Heuristic = (crowd: Crowd) => number; export declare class Desire { private _involved; private _heuristic; constructor(heuristic: Heuristic, involved: string[]); get heuristic(): Heuristic; anyInvolved(agents: Agent[]): boolean; } export declare class Desires { private _desires; constructor(); get any(): boolean; append(desire: Desire): Desires; clear(): void; anyInvolved(agents: Agent[]): boolean; heuristicTotal(crowd: Crowd): number; } export declare class Agents { private _agents; private _availableAgents; constructor(agents: Agent[]); get all(): Agent[]; get count(): number; allExcept(agent: Agent): Agent[]; popRandomAgent(): Agent; } export declare class Characteristics { private _name; private _table; constructor(name: string, characteristics?: string[]); get table(): TruthTable; is(characteristic: string): boolean; } //# sourceMappingURL=agent.d.ts.map