All Projects → ducandu → MaRLEnE

ducandu / MaRLEnE

Licence: other
Machine- and Reinforcement Learning ExtensioN for (game) Engines

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects
ruby
36898 projects - #4 most used programming language
C#
18002 projects

Projects that are alternatives of or similar to MaRLEnE

UE4-Plugin-Resources
A list of community resources for Slate, Graphs, and UE4 Plugin Development.
Stars: ✭ 105 (+123.4%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
RyansUE4Helpers
Extremely helpful helper functions for developing Blueprint and C++ projects in Unreal Engine.
Stars: ✭ 55 (+17.02%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
modio-ue4-legacy
Unreal Engine 4 Plugin for integrating mod.io - a modding API for game developers
Stars: ✭ 83 (+76.6%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
ProceduralDungeon
This is an Unreal Engine 4/5 plugin to generate procedural dungeon.
Stars: ✭ 95 (+102.13%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
DlgSystem
Dialogue Plugin System for Unreal Engine | 🪞 Mirror of https://bit.ly/DlgSource
Stars: ✭ 136 (+189.36%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
PsWebServer
Civet web server integration plugin for Unreal Engine 4
Stars: ✭ 24 (-48.94%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
AnimationPreviewer
Plug-in for previewing Animation Asset
Stars: ✭ 39 (-17.02%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
Carla
Open-source simulator for autonomous driving research.
Stars: ✭ 7,012 (+14819.15%)
Mutual labels:  deep-reinforcement-learning, ue4, unreal-engine-4
PsData
Flexible data model plugin for Unreal Engine 4
Stars: ✭ 34 (-27.66%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
tsu
TypeScript plugin for Unreal Engine 4
Stars: ✭ 62 (+31.91%)
Mutual labels:  ue4, unreal-engine-4, ue4-plugin
VaKawaseBlur
Fast and furious Kawase blur implementation for Unreal Engine 4
Stars: ✭ 37 (-21.28%)
Mutual labels:  ue4, ue4-plugin
Nav3D
3D Pathfinding and cover system plugin for UE4, using Sparse Voxel Octrees.
Stars: ✭ 58 (+23.4%)
Mutual labels:  ue4, ue4-plugin
VaFogOfWar
A clear and simple solution of Fog of War for Unreal Engine 4
Stars: ✭ 136 (+189.36%)
Mutual labels:  ue4, ue4-plugin
UT Framework
Various advanced tools built for Unreal Engine 4
Stars: ✭ 45 (-4.26%)
Mutual labels:  ue4, unreal-engine-4
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (-46.81%)
Mutual labels:  ue4, ue4-plugin
UE4-BYGLocalization
Simple CSV localization system for Unreal Engine 4
Stars: ✭ 54 (+14.89%)
Mutual labels:  ue4, ue4-plugin
UT GameEventSystem
A flexible event system in Unreal Engine 4
Stars: ✭ 33 (-29.79%)
Mutual labels:  ue4, unreal-engine-4
BluePrintRenderer
Javascript Unreal Engine 4 Blueprints Renderer
Stars: ✭ 81 (+72.34%)
Mutual labels:  ue4, unreal-engine-4
pokeai
Develop ultimate AI Pokémon trainer
Stars: ✭ 18 (-61.7%)
Mutual labels:  deep-reinforcement-learning, game-ai
PrFirebase
Firebase SDK integration for Unreal Engine 4
Stars: ✭ 25 (-46.81%)
Mutual labels:  ue4, ue4-plugin

MaRLEnE - Machine- and Reinforcement Learning ExtensioN for (game) Engines

Docs

Connecting the game dev world with reinforcement learning research.

Screenshot from AlienInvaders by https://ue4resources.com

Alien Invaders ((c) by Elhoussine Mehnik) learnt via TensorForce

What is MaRLEnE?

MaRLEnE is a UE4 extension that allows game developers and reinforcement learning (RL) engineers to work hand in hand by connecting a highly parallelized RL pipeline (e.g. backed by TensorForce) with any UE4 game and use that game as an RL environment. Our goal is to create smarter NPCs using state-of-the-art deep learning (DL) methods and models.

The Plugin is supported by TensorForce, a powerful RL library, allowing algorithms to reset the game environment (the "Env"), and then step through it (tick by tick), thereby executing different actions (called action- and axis-mappings in UE4) at different time steps.

The UE4 side (Game Developers)

Game developers can use the MaRLEnE UE4 extension to specify properties in the game, whose values are being sent to the ML pipeline after each step (e.g. the health value of a character or enemy). Also, UE4 camera actors can be used as scene observers such that they send their pixel recordings as 3D-tensors (w x h x RGB) after each time step back to the ML clients. In the future, we will make audio- and sound-observations available to the ML-side as well.

Game developers need to specify a port (via the plugin's settings), on which the game will listen for incoming ML control connections.

The python side (ML engineers)

Once a control connection into a running game has been initiated by your ML pipeline (e.g. TensorForce at github.com/reinforceio/tensorforce), it can send commands to the game and use the game as a learning environment. The environment is represented on the python side as an Env object and offers the following interface for ML algorithms:

  • seed: Set the random seed to some fixed value (for debugging and pseudo-random (reproducible) game play).
  • reset: Set the game to its initial state.
  • step: Perform a single tick (step) on the game by sending "action" information to UE4 (axis- and/or action-mappings). The step method returns an observation (following the single step), which can be used by the ML algorithm to update e.g. a neural network.

Quick setup

  1. Get the latest UnrealEngine 4 for PC/Mac/Linux. Go to UnrealEngine.com, then download and install the latest version of UE4.
  2. Create your game and add the two Plugins: MaRLEnE (see Plugins folder of this repo) and UnrealEnginePython to the project (need a local python executable to make this work), recompile your UE4 project with these two plugins added and activate them in your game.
  3. Use your favorite RL framework (e.g. pip install tensorforce) to run experiments against the MaRLEnE UE4 Envs. See below Synopsis for an example run with TensorForce.

Synopsis with TensorForce

from tensorforce.contrib.unreal_engine import UE4Environment
import random


if __name__ == "__main__":
    environment = UE4Environment(host="localhost", port=6025, connect=True, discretize_actions=True, num_ticks=6)
    environment.seed(200)

    # Do a quick random test-run with image capture of the first n images -> then exit after 1000 steps.
    # Reset the env.
    s = environment.reset()
    img_format = "RGB" if len(environment.states["shape"]) == 3 else "L"
    img = Image.fromarray(s, img_format)
    # Save first received image as a sanity-check.
    img.save("reset.png")
    for i in range(1000):
        s, is_terminal, r = environment.execute(action=random.choice(range(environment.actions["num_actions"])))
        if is_terminal:
            environment.reset()

    # now use s to do some RL :)

Cite

If you use MaRLEnE in your academic research, we would be grateful if you could cite it as follows:

@misc{mika2017marlene,
    author = {Mika, Sven and De Ioris, Roberto},
    title = {MaRLEnE: Bringing Deep Reinforcement Learning to the Unreal Engine 4},
    howpublished={Web page},
    url = {https://github.com/ducandu/MaRLEnE},
    year = {2017}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].