Skip to content

Commit 98e35bb

Browse files
author
Raphael Shu
committed
update_game
1 parent 15cb2b7 commit 98e35bb

6 files changed

Lines changed: 436 additions & 396 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,5 @@ $RECYCLE.BIN/
457457

458458
# https://www.toptal.com/developers/gitignore?templates=git,node,astro,cypressio,linux,macos,windows,visualstudiocode,webstorm,vim,emacs
459459
*.pyc
460+
461+
e2e_session*

README.md

Lines changed: 54 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,25 @@
1-
# Kaetram
1+
# AgentWorld
22

3-
[![Version](https://img.shields.io/github/package-json/v/Kaetram/Kaetram-Open)](https://github.com/Kaetram/Kaetram-Open/releases/latest 'Version')
43
[![MPL-2.0 License](https://img.shields.io/github/license/Kaetram/Kaetram-Open)][license]
5-
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fkaetram.com&style=flat)](https://kaetram.com 'Website')
6-
[![Build Status](https://img.shields.io/github/actions/workflow/status/Kaetram/Kaetram-Open/build.yml?branch=develop&label=build)](https://github.com/Kaetram/Kaetram-Open/actions/workflows/build.yml 'Build Status')
7-
[![E2E Status](https://img.shields.io/github/actions/workflow/status/Kaetram/Kaetram-Open/e2e.yml?branch=develop&label=e2e)](https://github.com/Kaetram/Kaetram-Open/actions/workflows/e2e.yml 'E2E Status')
8-
[![Open Issues](https://img.shields.io/github/issues/Kaetram/Kaetram-Open)][issues]
94

10-
[![Watch](https://img.shields.io/github/watchers/Kaetram/Kaetram-Open?style=social&icon=github)](https://github.com/Kaetram/Kaetram-Open/subscription 'Watch')
11-
[![Stars](https://img.shields.io/github/stars/Kaetram/Kaetram-Open?style=social&icon=github)](https://github.com/Kaetram/Kaetram-Open/stargazers 'Stars')
12-
[![Fork](https://img.shields.io/github/forks/Kaetram/Kaetram-Open?style=social&icon=github)](https://github.com/Kaetram/Kaetram-Open/fork 'Fork')
13-
[![Discord](https://img.shields.io/discord/583033499741847574?logo=discord&color=5865f2&labelColor=fff&style=flat)][discord]
14-
[![YouTube](https://img.shields.io/badge/YouTube-white?logo=youtube&logoColor=f00)](https://www.youtube.com/channel/UC0atP4sQbb4LJd6y4jijOHg 'YouTube')
15-
[![Twitter](https://img.shields.io/twitter/follow/kaetramofficial?style=social)](https://twitter.com/kaetramofficial 'Twitter')
16-
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/kaetram?style=social)](https://reddit.com/r/kaetram 'Reddit')
5+
AgentWorld is a collaborative gaming environment where AI agents can interact, explore, and play together in a 2D multiplayer world. Built as a research platform for multi-agent AI systems, AgentWorld enables developers to create, control, and study AI agents in a rich gaming environment.
176

18-
Kaetram is an open-source 2D MMORPG that expands on the original idea created by Little Workshop's BrowserQuest (BQ).
19-
We aim to provide a collaborative gaming experience as well as a game-engine for those interested in creating their
20-
own version. The game is still in early development stages and all help, suggestions, and bug reports are welcome.
21-
All of the assets are licensed under CC-BY-SA3.0 and we aim to hold onto the original BQ assets as well as expand
22-
upon them. The entire code-base has been re-written from scratch, optimized, and documented. Please see the GitHub
23-
wiki for information regarding development. Kaetram first started development in 2015 under the name of
24-
Tap Tap Adventure (TTA). In 2017, Kaetram was started as a complete re-write of the code which was formerly BQ-based.
7+
Key features for AI research and development:
8+
- **Multi-agent coordination**: Agents can collaborate, compete, and communicate with each other
9+
- **Rich observation space**: Comprehensive API for agents to perceive their environment
10+
- **Action space**: Agents can move, chat, fight, craft, and interact with the world
11+
- **Persistent world**: Agents can learn and adapt over time in a persistent environment
12+
- **Research-friendly**: Built-in APIs for easy integration with AI frameworks
2513

26-
Live Version &ndash; <https://kaetram.com>
14+
## Credits
2715

28-
Join us on Discord &ndash; <https://discord.gg/MmbGAaw>
16+
AgentWorld is built upon the excellent open-source foundation of [Kaetram](https://github.com/Kaetram/Kaetram-Open), an MMORPG that expands on Little Workshop's BrowserQuest. We're grateful to the Kaetram community for creating such a robust and well-designed game engine that serves as the perfect foundation for multi-agent AI research.
2917

30-
![Demo 1](https://i.imgur.com/PJdVts7.png)
3118

32-
![Demo 2](https://i.imgur.com/fmpcLhK.png)
33-
34-
![Demo 3](https://i.imgur.com/tQxib9S.png)
35-
36-
![Demo 4](https://i.imgur.com/Vlb3z8W.png)
37-
38-
![Demo 5](https://i.imgur.com/Fhvrw2S.png)
39-
40-
![Demo 6](https://i.imgur.com/eiK6wcr.png)
41-
42-
![Demo 7](https://i.imgur.com/C7cZsuf.png)
4319

4420
## Technologies
4521

46-
BQ was initially written as an HTML5 experiment showcasing the capabilities of web technologies
47-
back in 2012. Kaetram builds on top of the idea and uses modern standards to help facilitate
48-
readability, performance, and compatibility. Some of the many features are as follows:
22+
AgentWorld leverages modern web technologies to create a robust platform for multi-agent AI research and gaming. Built on the solid foundation of Kaetram, it uses modern standards to facilitate readability, performance, and compatibility. Key features include:
4923

5024
- Multiplayer using µWebSockets.
5125
- Enhanced rendering engine (includes dynamic lighting, overlays, animated tiles).
@@ -80,12 +54,12 @@ the server.
8054

8155
> You need to use a Node.js version greater than or equal to `v16.17.1`, following the
8256
> [Long Term Support (LTS) schedule](https://nodejs.org/en/about/releases), to have the most stable
83-
> experience when developing/experimenting with Kaetram. Older versions would not work with our
57+
> experience when developing/experimenting with AgentWorld. Older versions would not work with our
8458
> current dependencies and package manager.
8559
8660
#### NOTE: MongoDB
8761

88-
> MongoDB is not a requirement for Kaetram to run, but you can store and save user data if you
62+
> MongoDB is not a requirement for AgentWorld to run, but you can store and save user data if you
8963
> install it and run an online environment with all the features enabled. To do this, see
9064
> [Configuration](#configuration), and set `SKIP_DATABASE=false`. _If you do choose to install
9165
> MongoDB, a user is not necessary, but you can enable authentication with the `MONGODB_AUTH`
@@ -182,13 +156,12 @@ as a player's achievement/quest progress, or, in the case of trees, depending on
182156
In the future we plan to use this region system to create instanced versions of areas, for example running multiple minigame
183157
instances at the same time.
184158

185-
Video example showcasing region system using an exaggerated example:
186-
[![Kaetram Region System](https://img.youtube.com/vi/pt_CEgjfORE/0.jpg)](https://www.youtube.com/watch?v=pt_CEgjfORE)
159+
187160

188161
### Tilemap
189162

190-
Kaetram uses [Tiled Map Editor](https://www.mapeditor.org/) to create and modify the map. Our [map parsing](#map-parsing) tool
191-
is used to export a condesed version of the map data. The server receives the bulk of the information and uses it to calculate
163+
AgentWorld uses [Tiled Map Editor](https://www.mapeditor.org/) to create and modify the map. Our [map parsing](#map-parsing) tool
164+
is used to export a condensed version of the map data. The server receives the bulk of the information and uses it to calculate
192165
collisions, tile data information, and areas (pvp, music, etc). The client stores minimal data such as tile 'z-index' and animations.
193166

194167
### Map Parsing
@@ -209,13 +182,13 @@ To build the current game map, you can run
209182
yarn map
210183
```
211184

212-
### Kaetram Hub
185+
### AgentWorld Hub
213186

214187
The hub functions as a gateway between servers. Due to performance limitations of NodeJS it is more feasible
215-
to host multiple servers instead of one big one containing thousands of players. The hub does exactly that, once
188+
to host multiple servers instead of one big one containing thousands of agents and players. The hub does exactly that, once
216189
the hub is running and a server instance is given the host address for the hub, it will automatically connect. The
217-
hub becomes the primary connection point for the client. When a request for connection is received, the hub
218-
will pick the first server that has room for the player. Alternatively, it allows players to select any server
190+
hub becomes the primary connection point for clients and agents. When a request for connection is received, the hub
191+
will pick the first server that has room for the agent/player. Alternatively, it allows selection of any server
219192
amongst the list of servers.
220193

221194
To enable the hub server, see [Configuration](#configuration), and set these values to `true`.
@@ -619,65 +592,56 @@ yarn dev
619592
You should see a message in the console confirming the API has been initialized:
620593

621594
```
622-
Kaetram API has successfully initialized.
595+
AgentWorld API has successfully initialized.
623596
```
624597

625-
## Roadmap
598+
## Research & Development
626599

627-
Here we have [The Roadmap Project Board](https://github.com/Kaetram/Kaetram-Open/projects/1). This
628-
is the main board of the Kaetram-Open project. A kind of Kanban tasks board for tracking and
629-
presenting the progress to the community. Here we plan, prioritize and track our work.
600+
AgentWorld serves as a platform for multi-agent AI research and development. The system provides:
630601

631-
See also the [open issues][issues] for a list of proposed features (and known issues).
632-
633-
### TODO
602+
### Agent Research Features
634603

635-
- Add special attacks to weapons
636-
- Add functionality to the special abilities
637-
- Weapons/armours/rings/pendants enchantments
638-
- Diversify game content (add more skills, minigames, activities, items, etc)
639-
- Improve usability of the user interface on mobile devices
640-
- Move pathfinding to the server-side once alpha is over
604+
- **Multi-agent coordination**: Study how agents collaborate and compete in shared environments
605+
- **Emergent behaviors**: Observe complex behaviors arising from simple agent interactions
606+
- **Learning environments**: Test reinforcement learning and other AI approaches
607+
- **Social dynamics**: Research communication and social structures among AI agents
608+
- **Economic systems**: Study agent-based economic modeling in virtual worlds
641609

642-
## Donations
643-
644-
### Sponsor
645-
646-
Patreon &ndash; <https://www.patreon.com/kaetram>
647-
648-
Open Collective &ndash; <https://opencollective.com/kaetram>
649-
650-
### Crypto
610+
### TODO
651611

652-
`BTC` &ndash; `bc1qeh0tdlkuc5q82j2qk9h3sqmwe6uy75qpjtc0dv`
612+
- Enhanced agent observation APIs for better environmental awareness
613+
- Advanced coordination mechanisms for multi-agent tasks
614+
- Integration with popular AI/ML frameworks (OpenAI Gym, Ray, etc.)
615+
- Benchmark scenarios for agent evaluation
616+
- Improved logging and analytics for research purposes
617+
- Support for different agent architectures and learning algorithms
653618

654-
`LTC` &ndash; `MMRo7dfAi2T8rJrx7m3DmzhsgHRC7XJ83f`
619+
## License
655620

656-
`ETH` &ndash; `0x4c6de7175f789DAf0f531477753B07402EEfedaC`
621+
AgentWorld is distributed under the **[Mozilla Public License Version 2.0](https://choosealicense.com/licenses/mpl-2.0/)**. See [`LICENSE`][license] for more information.
657622

658-
`BCH` &ndash; `bitcoincash:qzx6uqunqj4mtv74jng97pea0mfcl4nmyqsew92enu`
623+
### Attribution Requirements
659624

660-
## License & Commission
625+
As AgentWorld is built upon Kaetram, we maintain the following attribution requirements:
661626

662-
Following the release of the beta, Kaetram-Open will only be updated once every 2-4 weeks. There will be no more updates to the sprite art, music, item/mob/npc/etc properties. This repository will provide you with the tools necessary to create your own version of Kaetram, there are plenty of assets included for that. Further modifications will primarily consist of game-engine improvements.
627+
- You MUST provide a direct link to [Kaetram](https://github.com/Kaetram/Kaetram-Open) in the credits section.
628+
- You MUST keep the code open-source and continue to do so.
629+
- You may NOT remove any credits to the original artists, musicians, or creators of the Kaetram project.
630+
- The credits section MUST remain accessible as per [W3C Accessibility Standards](https://www.w3.org/WAI/standards-guidelines/).
663631

664-
For all inquiries about purchasing a different license, commission work, or purchasing access to our up-to-date version please contact **@kaetram** on [Discord][discord] or email admin@kaetram.com.
632+
### Research and AI Use
665633

666-
This project is distributed under the **[Mozilla Public License Version 2.0](https://choosealicense.com/licenses/mpl-2.0/)**. See [`LICENSE`][license] for more information.
634+
Unlike the original Kaetram project, AgentWorld is specifically designed for AI research and agent-based applications. This project encourages and supports:
667635

668-
Additionally, Kaetram is shipped with a secondary license, Omnia Public License (OPL):
636+
- Academic research in multi-agent systems
637+
- Development of AI agents and intelligent systems
638+
- Machine learning and reinforcement learning research
639+
- Educational use in AI and computer science courses
669640

670-
- You MUST provide a direct link to Kaetram in the credits section.
671-
- You MUST keep the code open-source and continue to do so.
672-
- You may NOT use this project or any parts therein for anything related to artifical intelligence, cryptocurrencies, or NFTs without direct permission from the creators.
673-
- You may NOT remove the credits section. It MUST remain visible on the front page of the website. It MUST be easily accessible to any user who accesses the project as per [W3C Accessibility Standards](https://www.w3.org/WAI/standards-guidelines/).
674-
- You may NOT remove any credits to the artists, musicians, or any other original creators of this project.
675-
- You may NOT use this project or any parts therein to sell online courses, you may however use this for general streaming platforms, including view-based revenue.
676-
- You may NOT use this project or any parts therein for any illicit activity.
677-
- You may NOT use this project or any parts therein to spread hate, racism, or any form of discriminatory behaviour.
641+
### Restrictions
678642

679-
If you have any questions, contact @kaetram on [Discord][discord].
643+
- You may NOT use this project for any illicit activity.
644+
- You may NOT use this project to spread hate, racism, or any form of discriminatory behaviour.
645+
- You MUST respect the original licensing terms of all included assets and code.
680646

681647
[license]: LICENSE 'Project License'
682-
[issues]: https://github.com/Kaetram/Kaetram-Open/issues 'Open Issues'
683-
[discord]: https://discord.gg/MmbGAaw 'Join Discord'

agents/qwen/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
KAETRAM_BASE_URL = "http://localhost:9002"
1414
KAETRAM_API_ENDPOINTS = {
1515
"create": "/ai/create",
16-
"login": "/ai/login",
16+
"login": "/ai/login",
17+
"logout": "/ai/logout",
1718
"move": "/ai/move",
1819
"chat": "/ai/chat",
1920
"observe": "/ai/observe",

0 commit comments

Comments
 (0)