Giter Site home page Giter Site logo

civrealm-llm-baseline's Introduction

BaseLang & Mastaba: Civrealm-LLM-Agents

BaseLang and Mastaba are two LLM-based agents for the reinforcement learning environment CivRealm. BaseLand and Mastaba share a similar interface to CivRealm over standard Gymnasium, as provided in CivRealm. BaseLang implements a paraallel controller on each unit individually and Mastaba uses an "advisor" to lead them all. Both agent models are presented in the paper of CivRealm.

Prerequisit

civrealm from CivRealm. The list requirements.txt in the repository.

USAGE:

  1. Install civrealm properly with correct freeciv-web. (See CivRealm)

  2. Prepare the LLM's to use (GPT api key or local LLM URL)

  3. Prepare a PINECONE API Key.

  4. Set env varibles.

# Use AZURE_OPENAI_API_TYPE="azure" to use Azure LLM, otherwise use "openai"
export AZURE_OPENAI_API_TYPE="<your_open_api_type>"
export AZURE_OPENAI_API_VERSION='<your_openai_api_version>'
export AZURE_OPENAI_API_BASE='<your_openai_api_base>'
export AZURE_OPENAI_API_KEY='<your_openai_api_key>'
export LOCAL_LLM_URL='<if_need_local_llm_inference>'
export MY_PINECONE_API_KEY='<your_pinecone_api_key>'
export MY_PINECONE_ENV='<your_pinecone_env_name>'
  1. Execute the code. python main.py

civrealm-llm-baseline's People

Contributors

jestondeanda avatar siyuanqi avatar liyexn avatar

Stargazers

BangchengYang avatar Wang Boyu avatar ZergJH avatar

Watchers

Zilong Zheng avatar Hangxin Liu avatar SiyuanHuang avatar Zeyu Zhang avatar yt avatar

civrealm-llm-baseline's Issues

Support for OpenAI API

Hi,

Thank you for your great work!

Currently we are trying to reproduce the experiments, but it is easier for us to directly use OpenAI API instead of Azure supported OpenAI API.
Could you share some insights on why do you specifically choose the Azure API, and would it be compatible if we change them to OpenAI API?

Best,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.