Skip to content

NikitaVr/the-seed-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Seed - Server

Setup

Run yarn

Run tsc

Run node dist\index.js

Can Also press F5 inside Visual Studio Code while inside src/index.js and it will automatically watch for changes and rebuild, and run.

Should start to see server running, and processing empty actions

Can test out connecting a player and rendering by running code in the sample renderer repo : https://github.com/NikitaVr/the-seed-render

Initialize State

Core Loop

  1. Agents Connect (this can really be done at any point)
  2. Server sends State
  3. Agent
    1. Calculate Reward
    2. Calculate new Action
    3. Send new Action to Server
  4. Server
    1. Receives Actions
    2. Identify Conflicts (ex. 2 agents trying to eat the same food)
    3. Resolve Conflicts
    4. Take Actions -> New State
    5. Apply Environment Built In Changes (ex. berries growing)
    6. Send new State
  5. Repeat

When to Step

There are two options

1. Step Timer

Step Timer, where, for example, the server calculates a step every 2 seconds.

If an agent sends an action late, the server will calculate the action on the next step. If on the next step the server receives a more recent action from the agent, it will discard the old action.

2. Wait for All

This step is waits until all connected agents send an action. This means fast agents can train very quickly, and slow agents can take the time they need.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published