Giter VIP home page Giter VIP logo

gdmc2023's Introduction

GDMC 2023

Submission by Niels-NTG for the 2023 Generative Design in Minecraft AI Settlement Generation Challenge.

In this competition participants design and implement an algorithm that constructs a settlement in Minecraft. Submissions are judged on the aesthetics and narrative qualities of the output, on how functional the structure is from a gameplay perspective, and how well it adapts to any arbitrary Minecraft landscape.

Field Lab Gamma γ

For days I had this strange feeling of being watched from afar. Then suddenly one morning this strange structure appeared on the horizon. Yes. We're definitely being watched.

Field Lab Gamma is a mysterious scientific research station that suddenly just appeared into the world. Where did it come from? Who were the staff? Why were they spying on the villagers and where are they now?

2023-07-08_14.26.172023-06-16_14.02.552023-07-08_14.35.542023-07-08_14.26.17

Setup

This script works combined with the HTTP Interface Forge mod for Minecraft 1.19.2. The generator itself is written for Python 3.10 and requires the packages listed in requirements.txt. Also don't forget to run git submodule update --init to install the MCTS and gdpc packages. Start the generator by running main.py, no CLI arguments required. The structures will be placed somewhere within build area, this can be set by setting the buidarea by running /setbuiltarea fromX fromY fromZ toX toY toZ in Minecraft itself before running the generator.

Method

Pre-built structures

The generator is primarily designed around placing discrete pre-build structures into the world. Each structure is designed by hand to dynamically adapt to the terrain, connect to other adjacent structures and have custom properties if needed. Each is implemented as one or more NBT files that contain the actual Minecraft block data and a Python file that orchestrates the construction cost calculation, list possible adjacent structures, placement and pre- and post-processing steps for that type of structure. See StructureBase.py for the base class.

MCTS

To decided where and what to build, this generator uses Monte Carlo Tree Search (MCTS). Each node in the tree $a$ is assigned a type of structure and construction cost by the action $a$ taken from the parent node.

When running the search, it starts constructing a tree of nodes starting a pre-constructed root node. For its rollout policy (also known as tree policy), it randomly selects actions weighted by the cost of doing this action. Actions with a cost of less than 0 are not considered. For example, an action resulting in structure being build very high above the ground has a much lower likelihood of being chosen by this policy compared to a structure that keeps very close to the ground because the cost of constructing support pillars contribute less to the cost.

To guide the search, nodes have a reward function that calculate how close its state is to the goal. In the case of DebugSettlement.py the reward function is rather simple: distance to a position in the world. When selecting and expanding the tree, the search algorithm favours structures that are cheaper to build. In the subsequent simulation phase.

gdmc2023's People

Contributors

niels-ntg avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.