GithubHelp home page GithubHelp logo

lil-lab / cb2 Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 3.0 49.69 MB

An NLP research and data collection platform.

Home Page: https://cb2.ai

License: MIT License

Jupyter Notebook 0.40% Shell 0.11% Python 65.77% ShaderLab 4.63% C# 16.97% HLSL 0.66% CSS 0.54% HTML 10.43% JavaScript 0.49%

cb2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cb2's Issues

RGB Images of Leader and Follower Views During Gameplay

Hello, I would like to save RGB images of the views of the leader and follower during each game session. Whenever the leader or follower takes an action resulting in an update to their views, I want to save their views as .png or other format RGB images. Where should I add the code for this functionality? I'm not very familiar with frontend and backend knowledge, so I would greatly appreciate your help in solving this problem.

Using Pretrained Models error

when I run this command:
python -m follower_bots.training.follower_demo --host=http://localhost:8080/ --experiments_folder=./follower_bots/experiments/pretraining/deployment_models --experiments_name run_3
error:
pygame 2.1.2 (SDL 2.0.18, Python 3.9.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "C:\Anaconda\envs\cb2\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Anaconda\envs\cb2\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\keyang\Desktop\yan0\Agent\cb2\follower_bots\training\follower_demo.py", line 15, in
from follower_bots.data_utils.pyclient_utils import (
File "C:\Users\keyang\Desktop\yan0\Agent\cb2\follower_bots\data_utils\pyclient_utils.py", line 30, in
from py_client.endpoint_pair import EndpointPair
ModuleNotFoundError: No module named 'py_client.endpoint_pair'

peewee.InterfaceError: Error, database must be initialized before opening a connection

when I try to train a new model by running this command:python -m follower_bots.data_utils.preprocess_sql, error occurred `
pygame 2.1.2 (SDL 2.0.18, Python 3.9.18)
Hello from the pygame community. https://www.pygame.org/contribute.html
Record directory follower_bots\pretraining_data\game_records does not exist. This is okay, it's just a sign that the logged network packets may be missing. Or it's your first time running a config.
Reading database from follower_bots\pretraining_data\game_data.db
Traceback (most recent call last):
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3158, in execute_sql
cursor = self.cursor(commit)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3142, in cursor
self.connect()
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3087, in connect
raise InterfaceError('Error, database must be initialized '
peewee.InterfaceError: Error, database must be initialized before opening a connection.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Anaconda\envs\cb2\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Anaconda\envs\cb2\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\keyang\Desktop\yan0\Agent\cb2\follower_bots\data_utils\preprocess_sql.py", line 541, in
main()
File "C:\Users\keyang\Desktop\yan0\Agent\cb2\follower_bots\data_utils\preprocess_sql.py", line 531, in main
base.CreateTablesIfNotExists(server.schemas.defaults.ListDefaultTables())
File "C:\Users\keyang\Desktop\yan0\Agent\cb2\server\schemas\base.py", line 61, in CreateTablesIfNotExists
database.create_tables(tables)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3348, in create_tables
model.create_table(**options)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 6721, in create_table
cls._schema.create_all(safe, **options)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 5828, in create_all
self.create_table(safe, **table_options)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 5683, in create_table
self.database.execute(self._create_table(safe=safe, **options))
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3173, in execute
return self.execute_sql(sql, params, commit=commit)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3167, in execute_sql
self.commit()
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 2933, in exit
reraise(new_type, new_type(exc_value, *exc_args), traceback)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 191, in reraise
raise value.with_traceback(tb)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3158, in execute_sql
cursor = self.cursor(commit)
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3142, in cursor
self.connect()
File "C:\Anaconda\envs\cb2\lib\site-packages\peewee.py", line 3087, in connect
raise InterfaceError('Error, database must be initialized '
peewee.InterfaceError: Error, database must be initialized before opening a connection.
`

I'm sure game_data.db is in the pretraining_data folder.
Snipaste_2024-03-03_16-35-34

Game rules setting

Hello, can I configure the amount of time each agent can use in each turn, and if so, where can I change it?

Game rules change. Whether it is possible to change the way cards are selected

Hello, When I check the human-model Deployment data you provided, I find that when the agent wants to get the card in front, it inevitably passes the card under its feet, so the card under its feet is automatically selected, but it is not the card it wants to select. Could I change the rules so that standing on a card for a certain amount of time that the card is selected, or could I have a button that indicates that the card is selected when the button is tapped? If so, what part of the code should I change?

Crash starting server

I followed all the setup steps in the readme (I think) with no errors, but when I run the following to start the server:

python3 -m server.main --config_filepath="server/config/local-config.yaml"

I get this error:

python3 -m server.main --config_filepath="server/config/local-config.yaml"
[2023-05-11 12:00:03,354] server.config.config INFO [config:ValidateConfig:47] //////////////// Created data directory /home/corys/.local/share/cb2-game-dev ////////////////
[2023-05-11 12:00:03,354] server.config.config WARNING [config:ValidateConfig:52] Record directory /home/corys/.local/share/cb2-game-dev/game_data.db does not exist. This can happen if it's your first time running a new config. The program will just create a database for you.
[2023-05-11 12:00:03,354] server.config.config WARNING [config:ValidateConfig:57] Record directory /home/corys/.local/share/cb2-game-dev/game_records does not exist. This is okay, it's just a sign that the logged network packets may be missing. Or it's your first time running a config.
[2023-05-11 12:00:03,354] root INFO [main:main:1384] Config file parsed.
[2023-05-11 12:00:03,354] root INFO [main:main:1385] data prefix:
[2023-05-11 12:00:03,354] root INFO [main:main:1386] Log directory: /home/corys/.local/share/cb2-game-dev/game_records
[2023-05-11 12:00:03,354] root INFO [main:main:1387] Assets directory: /home/corys/.local/share/cb2-game-dev/assets
[2023-05-11 12:00:03,354] root INFO [main:main:1388] Database path: /home/corys/.local/share/cb2-game-dev/game_data.db
[2023-05-11 12:00:03,363] server.schemas.base INFO [base:SetDatabase:30] Pragmas: [['journal_mode', 'wal'], ['cache_size', -1048576], ['foreign_keys', '1'], ['synchronous', 'off']]
[2023-05-11 12:00:03,376] root INFO [main:main:1405] WARNING:
Traceback (most recent call last):
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py", line 557, in __init__
    raise ValueError("Not a directory")
ValueError: Not a directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/corys/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/corys/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/corys/cb2/server/main.py", line 1432, in <module>
    fire.Fire(main)
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
    component_trace = _Fire(component, args, parsed_flag_args, context, name)
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire
    component, remaining_args = _CallAndUpdateTrace(
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
    component = fn(*varargs, **kwargs)
  File "/home/corys/cb2/server/main.py", line 1415, in main
    loop.run_until_complete(tasks)
  File "/home/corys/anaconda3/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/home/corys/cb2/server/main.py", line 1290, in serve
    app.add_routes(routes)
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_app.py", line 334, in add_routes
    return self.router.add_routes(routes)
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py", line 1200, in add_routes
    registered_routes.extend(route_def.register(self))
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_routedef.py", line 98, in register
    resource = router.add_static(self.prefix, self.path, **self.kwargs)
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py", line 1124, in add_static
    resource = StaticResource(
  File "/home/corys/cb2/cb2/lib/python3.9/site-packages/aiohttp/web_urldispatcher.py", line 559, in __init__
    raise ValueError(f"No directory exists at '{directory}'") from error
ValueError: No directory exists at '/home/corys/cb2/server/www/WebGL'

Any thoughts?

Inquiry Regarding Feedback Mechanisms and Gameplay Functionality in Cereal Bar V2 GitHub Repository

As I delve into the implementation of the endpoints presented in your repository, I am particularly interested in understanding how these endpoints handle feedback mechanisms within a gaming environment. Specifically, I am curious to know if the provided endpoints are capable of receiving feedback from both leaders and followers during gameplay scenarios. For instance, can the system effectively detect and respond to ambiguous commands issued by leaders to followers? Furthermore, is there a mechanism in place to output error messages and preserve relevant data when followers fail to execute commands accurately?

Moreover, the game you provided only has a tutorial and cannot truly proceed with a full gameplay. Besides, I am interested in knowing if it is feasible for human players to assume dual roles, acting as both leader and follower within a single gaming session. Additionally, I am curious if there are provisions within the system to collect data from such dual-role gameplay scenarios.

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.