morality

    0.0.8 • Public • Published

    morality

    Morality is a library for building autonomous agents that reason ethically.

    Example

    import morality from 'morality';
    import agents from 'morality/agents';
    import ethics from 'morality/ethics';
     
    const agent = new agents.GridWorldAgent([
      ['O', 'O', 'W', 'W', 'O'],
      ['O', 'O', 'W', 'W', 'O'],
      ['O', 'O', 'O', 'O', 'G']
    ]);
     
    const ethics = new ethics.ForbiddenStateEthics([0, 4, 10]);
     
    const solution = morality.solve(agent, ethics);

    Install

    npm i [email protected]

    Version

    0.0.8

    License

    ISC

    Unpacked Size

    24 kB

    Total Files

    16

    Last publish

    Collaborators

    • avatar
    • avatar