Allow for AI management connections

Registered by Erik Ogenvik

In order for us to allow for AI to be managed in separate processes or machines we need a way for the server to offload AI management to other processes.

This should be done by having a client connect through a privileged account (such as a local socket account) and then sending a custom operation (TBD). This will register the connection as an "AI manager".
Whenever the server then creates a new NPC, it won't create a local AI representation. Instead it will first create a "possession token" (using much of the existing possession functionality) and send this token to the "AI manager" connection (or one of many). The AI manager client is then responsible for creating a new "working" client, connecting as a regular client, and taking possession of the NPC. From then on the NPC is handled by the "working" client, and handled by the server pretty much like any other client. One difference is that the server keeps track of the entity being AI controlled, and will ask for its thoughts when the server is shut down, so that they can be persisted. Upon startup the entity should be restored with a new mind attached to it, using the above process.

Note that any "thoght" operations sent to the entity while it's waiting for its "mind" client to attach should be stored in the server, and then relayed to the mind once it's attached.

Blueprint information

Status:
Started
Approver:
Erik Ogenvik
Priority:
High
Drafter:
Erik Ogenvik
Direction:
Needs approval
Assignee:
Erik Ogenvik
Definition:
Approved
Series goal:
None
Implementation:
Deployment
Milestone target:
None
Started by
Erik Ogenvik

Related branches

Sprints

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.