brica_platform

This is an old revision of the document!


The BriCA Platform is a collection of software modules to develop brain-inspired cognitive architecture with BriCA and to be run on OpenAI Gym.

BriCA Platform contains the following modules:

  • BriCA1: the BriCA core to describe and run brain-inspired cognitive architectures (in Python).
  • brica_gym: a Python program to create OpenAI Gym agents
    (containing classes for adapting to Gym execution cycles)
  • BriCAL: interpreter that generates code from BriCA Language description
  • bif_excel2brical: utility to generate BriCA Language files from spreadsheet (Excel) files

Cognitive architecture development with the BriCA Platform could proceed in the following order:

  1. Describe modules, ports, and connections in a spreadsheet (Excel file)
    (See bif_excel2brical and the examples below for the format.)
  2. Convert the spreadsheet into the JSON format with bif_excel2brical
  3. Implement a Gym environment, BriCA components, and the main program (see the examples below).
  4. Test & debug

BriCA言語インタプリタとOpenAI Gymを用いた認知アーキテクチャのコードは概ね次のようなコードを含みます。

  • 必要なライブラリのインポート(含 brica1, brica1.brica_gym, brica1,brical, gym, numpy, json
  • JSON形式のBriCA言語記述ファイルの読み込み、形式チェック
    (この段階で BriCAモジュールが生成されBriCA言語内部表現nbに紐付けられます)
  • 他の設定ファイルなどの読み込み(あれば)
  • Gym環境インスタンス生成
  • BriCAコンポーネント初期化
  • ポート作成(nb.make_ports()
  • agent_builder = brical.AgentBuilder()
  • agent = agent_builder.create_gym_agent(nb, 認知アーキテクチャ最上位モジュール, Gym環境インスタンス)
  • scheduler = brica1.VirtualTimeSyncScheduler(agent)
  • ループを回して BriCAの “scheduler.step()''を実行
    (Gym環境と同期させるためにトークンを回していることに注意)
  • 終了後環境などをクローズ

具体例は下記を参照ください。

BriCAテスト

(Gymエージェントではない)

最小限の認知アーキテクチャ

皮質・基底核・視床ループ

注意機構を持つ作業記憶

(Gymエージェント)

上記3つの実装の解説はこちら

  • brica_platform.1651045911.txt.gz
  • Last modified: 2022/04/27 16:51
  • by n.arakawa