Code Monkey home page Code Monkey logo

redflowerhell's Introduction

Red Flower Hell in Minecraft MALMÖ

NB4tf4i's Red Flowers (Red Flower Hell) - DEAC-Hackers Battle Royale Arena

  • HI agents: initial hack: 18, world record: 46 poppies
  • SW agents: initial hack: 13, world record: 53 poppies
  • AI agents: there are no such agents at this moment, initial hack: -, world record: - poppies
  • AGI agents: there are no such agents at this moment, initial hack: -, world record: - poppies

Red Flower Hell

Nowadays the key players in the artificial intelligence industry have their own platform for AGI research that is typically built on some well-known current or former game title. For example, Google uses the Quake III Arena and Star Craft II. Microsoft uses Minecraft for similar research purpose [1].

The Project MALMÖ is a Minecraft mod created by the Microsoft. Now we have started to use MALMÖ in education of programming. Then based on the experience gained with this we would like to use it in AGI research too. For this purpose we have begun to experiment with our own series of competitions called Red Flower Hell. The specific purpose of this challenge series is to collect as many red flowers as possible before the lava flows down the hillside as it can be seen in the following figure. Red Flower Hell Arena

Human Intelligence agents (HI agents)

In the elements of Red Flower Hell series we are going to develop intelligent agents to collect poppies. After this we would also like develop AGI agents in this environment. It is therefore essential to know that how many poppies can a human player collect?

nb4tf4i.xml
nb4tf4i_red_flower_hell_basic_human.py

HI Agents Results

Software agents (SW agents)

These programs do not contain the usual MI solutions (such as graph searching or Q-learning), but only naive heuristic algorithms.

Family circle (with my children)

The first experiments with MALMÖ we had taken in our immediate family circle as we did with, for example, project BrainB [1] or SMNIST [2]. We have played with cheating (using ObservationFromGrid) and without cheating as well.

Study circles (for primary and secondary school pupils and students)

First circle

Demo

nb4tf4i.xml
nb4tf4i_red_flower_hell_basic.py

  • Modify the initial loop
# Loop until mission ends:
while world_state.is_mission_running:
    print("--- nb4tf4i arena -----------------------------------\n")
    self.agent_host.sendCommand( "move 1" )
    time.sleep(.5)            
    self.agent_host.sendCommand( "turn 1" )
    time.sleep(.5)
    world_state = self.agent_host.getWorldState()

to rotate Steve at half speed.

  • Modify the loop to move Steve forward and backward.
  • Modify the loop to move Steve forward by turning right and left (zig-zag).
  • Modify the loop to walk Steve around in the arena.
  • Modify the loop to move up Steve in spiral line in the arena until he reach the lava.

Second circle

Demo

nb4tf4i_d.xml
nb4tf4i_red_flower_hell_basic_d.py

# Loop until mission ends:
while world_state.is_mission_running:
    print("--- nb4tf4i arena -----------------------------------\n")
    self.agent_host.sendCommand( "move 1" )
    time.sleep(.5)            
    self.agent_host.sendCommand( "move 1" )
    time.sleep(.5)            
    self.agent_host.sendCommand( "move 1" )
    time.sleep(.5)            
    self.agent_host.sendCommand( "turn 1" )
    time.sleep(.5)
    world_state = self.agent_host.getWorldState()

Let's do the same task as in the first circle but now with using discrete motion commands.

Third circle

Programming task
nb4tf4i_red_flower_hell_basic_d_sense.py

class Steve:
    def __init__(self, agent_host):
        self.agent_host = agent_host
        self.x = 0
        self.y = 0
        self.z = 0        
        self.yaw = 0
        self.pitch = 0        

    def run(self):
        world_state = self.agent_host.getWorldState()
        # Loop until mission ends:
        while world_state.is_mission_running:
            print("--- nb4tf4i arena -----------------------------------\n")
            if world_state.number_of_observations_since_last_state != 0:

                sensations = world_state.observations[-1].text
                print("    sensations: ", sensations)                
                observations = json.loads(sensations)
                nbr3x3x3 = observations.get("nbr3x3", 0)
                print("    3x3x3 neighborhood of Steve: ", nbr3x3x3)

                if "Yaw" in observations:
                    self.yaw = int(observations["Yaw"])
                if "Pitch" in observations:
                    self.pitch = int(observations["Pitch"])
                if "XPos" in observations:
                    self.x = int(observations["XPos"])
                if "ZPos" in observations:
                    self.z = int(observations["ZPos"])        
                if "YPos" in observations:
                    self.y = int(observations["YPos"])  

                print("    Steve's Coords: ", self.x, self.y, self.z)        
                print("    Steve's Yaw: ", self.yaw)        
                print("    Steve's Pitch: ", self.pitch)
  • Modify this code to print what Steve sees.

Hint:

if "LineOfSight" in observations:
    lineOfSight = observations["LineOfSight"]
    self.lookingat = lineOfSight["type"]
print("    Steve's <): ", self.lookingat)
  • Then modify the code further to print a debug message if Steve sees a red flower.
    A solution can be seen in this video: https://youtu.be/mT9FOzzSjUI

  • Finally, modify the code to mine a red flower.

Fourth circle

Programming task: Steve should go up to the lava then come back down to the starting level walking ahead of the lava.

Fifth circle

Let's do the same task as in the previous circle but now with using 5x5x5 or 7x7x7 grid of blocks in ObservationFromGrid.

Courses (for university students)

In these courses students can earn extra points by solving MALMÖ based programming tasks.

High-level programming languages I

Syllabus, lectures, laboratory work, community.

Norbi Prog1
There are usually roughly 130 students in the High-level programming languages I lecture. This picture was taken on Wed, 19 Feb 2020.

The purpose of the following contests (Red Flower Hell I.-IV.) is to gain experience in agent programming. There is no reward or prize. We play the game for the game's sake.

Red Flower Hell I.

10 Feb - 2 Mar
Using ObservationFromGrid has already been a cheating in itself. But in this first round there are no rules, anything is allowed, for example the students can use directly the coordinates of flowers from mission XML file with the teleport command... and so on.

How to participate? Comment the link of your YouTube video to the post: https://www.facebook.com/groups/udprog/permalink/1337108209810398/

Results

Summary: the purpose of this round was to install and learn about MALMÖ.

Red Flower Hell II.

2 Mar - 23 Mar

Based on experience gained in the first round, the following are prohibited:

  • using the data of the mission XML file
  • using absolute movement commands
  • modifying the mission XML file
  • changing the game mode
  • gaining mouse control

How to participate? Comment the link of your YouTube video to the post: https://www.facebook.com/groups/udprog/permalink/1342653805922505/

Results

Red Flower Hell III.

23 Mar - 6 Apr

Qualification limit: 25 poppies. The deadline for submission of the source code of your SF agent is 1 Apr. There will be online qualifiers followed by offline (online because coronavirus) finals at the spring school holidays. Until now the red flowers have always been placed to the same place. In the finals, the locations of the red flowers will be re-generated. (For example, try this mission XML file: nb4tf4i_d_2.xml )

How to participate? Comment the link of your YouTube video to the post: https://www.facebook.com/groups/udprog/permalink/1359276454260240/

Qualification Results

Final Results

  • Day 1, Day 2, Day 3,
    source codes available
  • first place: 46 poppies, there was a dead heat for first place between Káplár, I. & Halász, D. and Kiss, K. & Hegedűs. P.
  • second place: 43 poppies, Hajdu, B. & Dávid, Gy.
  • third place 40 poppies, Szabó, B. & Pete, B.
  • 4-th place 38 poppies, Nagy, L. E. & Tódor, G.
  • 5-th place 36 poppies, Kálmán, I. & Katona, A.
  • 6-th place 34 poppies, Takács, B. & Szabó, D.
  • 7-th place 22 poppies, Kántor, D.
  • 8-th place 11 poppies, Hosszú, Gy. & Zselenák, F.
Red Flower Hell IV. - "RFH Rudolph"

13 Apr - 8 May

Mission XML files:

Qualification limit: (hard: 5/soft: 9) poppies. The deadline for submission of the source code of your SF agent is 8 May. In this round the full arena will be re-generated: not only the coords of the red flowers but also the walls of the hillside will change as it can be seen in the following figure.

Red Flower Hell Arena 4 Rudolf has been chosen as the default arena for RFH IV.

How to participate? Comment the link of your YouTube video to the post: https://www.facebook.com/groups/udprog/permalink/1380895935431625/

HI Agents Results (Human)

Qualification Results (Hard)

Qualification Results (Soft)

Final Results (Hard)

  • initial hack: -
  • current first place: -
  • current second place: -
  • current third place: -

Final Results (Soft)

  • initial hack: -
  • current first place: -
  • current second place: -
  • current third place: -

High-level programming languages II

See AI agents

Esport

See AGI agents

Artificial Intelligence agents (AI agents)

Artificial General Intelligence agents (AGI agents)

Our other Minecraft-based activities

References

[1] Johnson, M., Hofmann, K., Hutton, T.,Bignell, D. (2016). The Malmo Platform for Artificial Intelligence Experimentation, 25th International Joint Conference on Artificial Intelligence, https://www.ijcai.org/Proceedings/16/Papers/643.pdf

[2] Bátfai, N., Papp, D., Besenczi, R., Bogacsovics, G., & Veres, D. (2019). Benchmarking Cognitive Abilities of the Brain with the Event of Losing the Character in Computer Games. Studia Universitatis Babeș-Bolyai Informatica, 64(1), 15-25. doi:10.24193/subbi.2019.1.02

[3] Norbert Bátfai, Dávid Papp, Gergő Bogacsovics, Máté Szabó, Viktor Szilárd Simkó, Márió Bersenszki, Gergely Szabó, Lajos Kovács, Ferencz Kovács, Erik Szilveszter Varga (2019). Object file system software experiments about the notion of number in humans and machines. Cognition, Brain, Behavior. An interdisciplinary journal. Volume XXIII, Nr 4, 257-280, doi:10.24193/cbb.2019.23.15

[4] Bátfai, N., Csukonyi Cs., Papp D, Hermann Cs., Deákné O. E., Győri K. (2020) The DEAC-Hackers esport department's education and research concept in AI in Minecraft (accepted Hungarian manuscript)


Norbert Bátfai, PhD., University of Debrecen, IT Dept., [email protected]
nb4tf4i

Last modified: Fri, 8 May 2020 11:59:00 GMT

redflowerhell's People

Contributors

nbatfai avatar pisti9928 avatar xszbencex avatar hpeti avatar sotori32 avatar hajdubence avatar k-daniel98 avatar viktorpalffy avatar hosszugyula avatar kdani-99 avatar rangerfoxy avatar sidlacinagy avatar ppo01 avatar mentol555 avatar kusmiczkibalazs avatar kissdavid37 avatar kikiryki3 avatar czanikan avatar bbarna9 avatar windarf avatar konn25 avatar gyulaid avatar gergelyn avatar bukovinszkimark avatar bczovek 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.