-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
gnitr edited this page Feb 11, 2018
·
12 revisions
- Python 3.6+
- clone the repo
- checkout the latest stable tag (e.g. 0.4)
- create a python virtual environment (use conda or virtualenv)
- populate it with
pip install -r requirements.txt
- create a file called local.py under unscripted/settings with something like this:
from .base import *
DEBUG = True
SECRET_KEY = 'yoursecrekey'
ALLOWED_HOSTS = ['*']
DB_THINGS['PORT'] = 27017
UNSCRIPTED_ENGINE_BACKEND = 'pymemdb'
UNSCRIPTED_REMOTE_API = 'ws://127.0.0.1:8000/api/1/'
UNSCRIPTED_REQUEST_BACKEND = 'WSSession'
UNSCRIPTED_REQUEST_ASYNC = 1
python manage.py migrate
- run the web server:
python manage.py ucore runserver
- let it run, now open a different terminal session session and:
- (re)create a new virtual world:
python manage.py ucore crunch; python manage.py ucore new
- populate the world with bots:
python manage.py utest any repop_well
- simulate 100 cycles:
python manage.py utest any simulate --cycle 100
- you can also visualise the world while the server is running by pointing your browser to http://localhost:8000/worlds/WORLDID . Where WORLDID is a unique identifier for the world that can be obtained by running
python manage.py ucore info
- the Web API is available at http://localhost:8000/api/1
- to see all worlds: http://localhost:8000/api/1/worlds
- to see all things in a world: http://localhost:8000/api/1/worlds/WORDID/things
- alternatively: http://localhost:8000/api/1/things?rootid=WORLDID
- to see all bots in a world: http://localhost:8000/api/1/things?rootid=WORLDID&module=bot
Copyright © 2017 Artilligence