This is a trivial initial implementation of the system described on the accompanying Reputation.md file, and initially published on this gist.
Everything is kept in memory. The focus is on testing the mechanics on an easy to change enviroment.
This version expects a Postgres database configured with Prisma. You will need to have the connection string on DATABASE_URL
, and run
bun prisma migrate dev
To start the development server run:
bun run dev --watch
The REST API is running at http://localhost:3000/ - check index.ts
for the current implementation.
Read the initial draft for a description of the goals.
See Design and implementation for both a TODO and considerations behind major decisions.
As of v0.2.0, the behavior fills all the basic criteria I expect from my initial notes, and implements blocking and opting out of getting reputation by default.
Using v0.1.0 of the agent swarm, we find that even after a few thousand epochs:
- The decay rate helps handle potential runaway leader issues;
- No particular account comes to dominate, even if they have a large number of users giving them points;
- Morat's own account doesn't get an overwhelming amount of points, even when some users do large transfers, given the fact that they only act as a sink on transfers over 100 and will decay along with everyone else;