MOZAIC

Wout Schellaert

Wout Schellaert

Gent, Vlaanderen

6 0
  • 0 Collaborators

A platform for easily building your own AI competition. Whether you want to create fun game for kids to learn to code, or an audacious challenge for the best in the field, you shouldn't have to write everything from scratch again. With MOZAIC you can focus on your competition and your users! ...learn more

Project status: Under Development

HPC, Networking, Game Development, Artificial Intelligence

Code Samples [1]

Overview / Usage

When you want to organize an AI competition, there is a lot off stuff involved that is not about the game itself. With MOZAIC we try to tackle two of the hard problems: networking and state management. Networking code is notoriously difficult, and when you combine it with possibly complex games over a server and multiple clients it get's very hard to reason about how you want things to behave.

By offering a strong core of abstractions over the network state, combined with modular opt-in utilities we provide competition organizes with powerful tools to create the functionality they want.

Concretely we have provide a Rust server in which you plug your ruleset (game) which is able to communicate over TCP with multiple JS clients (which we also provide). You interact with this system trough a simple event based API, which while running creates fully replayable logs. Debug your competition code, inspect your AI's moves, replay the game any time.

At Zeus WPI (the student organization for computer science at Ghent University), we organize a yearly AI competition. It's here we discovered the problem. Every year we'd have to rewrite major parts of code because they we're to interwoven with game rules.
With MOZAIC, we can now fully focus on the game! We also used this flexibility to create small competitions to introduce new students to programming.

Methodology / Approach

Each year there are 2 moments when we need a finished game, once for the big competition, once for the introduction-to-code-for-new-students event. We define a feature-set we want to have available trough MOZAIC in an abstract and solid way, which we then implement. Other things we hack together in a game specific way.

This way we increasingly extend the functionality of MOZAIC as a platform.

Technologies Used

The server is written in Rust, where we make strong use of the wonderful tokio library for handling the lower level networking. We serialize and deserialize all messages using Protobuf. The client is TypeScript on NodeJS.

For our actual games, we of course use the MOZAIC platform, as a base layer, and for user interaction we use an Electron + TypeScript + React/Redux stack.

Repository

https://github.com/ZeusWPI/MOZAIC

Comments (0)