Giter Club home page Giter Club logo

mozaicp's Introduction

MOZAICP

MOZAICP (silent P)

MOZAIC is the Massive Online Zeus Artificial Intelligence Competition Platform. It aims to provide a flexible platform to host your very own AI competition. Just plug your game, and off you go!

Eventually MOZAIC should be very modular, so that you can provide a custom-tailored experience for your competitors, without having to worry about the heavy lifting.

Contact

Have any questions, comments, want to contribute or are even remotely interested in this project, please get in touch! You can reach us by e-mail, Facebook, or any other way you prefer listed here.

Current goals

  • Remove capnproto this keeps us down, it's not logical that you would have to decompose and recompose capnproto messages per reactor stop. If not capnproto we need something else, but I think it is possible to just accept everything with 'an ID'. You just have to transport 2 things, a typeid, and a pointer. Yes it is ugly ish, yes it is cool and probably fast.

  • Try to remove Broker from the equation, I think it would be way better to have a more 'genetic' structure, where a link wraps a mpsc::Sender directly to the reactor.

  • Cascade on delete. On of the many challenges is that it is very hard to clean everything up. It is possible for sure, but not expected of end users. It would be nice to have a cascade on delete function, so reactors can open links that when closed they are closed.

Flow

MOZAICP consists of multiple big components.

Reactors are the nodes in your genetic network. They consist of a state S and handlers for internal messages, HashMap<TypeId, ReactorHandler>. A reactor also has links to other reactors. HashMap<ReactorId, Link>.

A Link is a one way link between Reactors, it should at all times be matched with another link in the opposite direction. A link consists of a state S and handlers for internal and external messages, both HashMap<TypeId, LinkHandler>.

Handler is most of the time a pair of a type T and a function that uses a context C and that T. It has a function handle that accepts a context C. a type M (Runtime specific) that gets transformed into a T and is handled by that function.

A ReactorHandler is a Handler with a ReactorContext. This context holds that reactor state S and a ReactorHandle that can open links and spawn new Reactors and send 'internal' messages.

A LinkHandler is a Handler with a LinkContext. This context holds that link state S and a LinkHandle that can close that link, send 'internal' messages to its owning reactor, and send 'external' messages, to the other side of the link (via that mpsc::Sender).

Internal messages get handled as follows: first the reactor tries to find a corresponding Handler. Next he sends the message to all his links to see if any of them handle that message.

External messages get handled as follows: the reactor reads that messages from his channel and looks for the corresponding link (this might fail). That links tries to handle that message with the correct handler (this might fail).

Everything is dependent on what messages can be transported, being the M type parameter. This is made clear with the Broker I guess. A Broker only distributes the mpsc::Sender for all reactors in that Broker.

mozaicp's People

Contributors

iasoon avatar ajuvercr avatar rien avatar hannes-dev avatar wschella avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

mozaicp's Issues

Logging

What if there is a bug?
How would you ever know what is going wrong? At least there should be an option to flood your stdout with useful information about what is going on.

It may be useful to use tokio/tracing because everything is async etc

Synchronisation

When a client is disconnected and then reconnects, it is overwhelmed with game states.
In the current implementation the client just sends the first game state it finds to the bot that then answers back, this is not good because the server will interpret that move as the real move but it is based on a (by then) invalid state.

Server/client should filter out out of sync messages. (MOZAIC may ship reactors to fix this soon)

Is this correct

Check if the gamerules are implemented identically to what the previous MOZAIC/planetwars did.
This can be done via logs or just reasoning.

Docs

Please add some docs, this is unreadable..
There are some docs but often than not they are wrong.
Same with variable names, they are just copy pasted from other places but they make no sense what so ever..

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.