AI for Games 3: Midwars edition

HoN Bot Coding course at the University of Helsinki

Introduction

In this workshop style course, students will form groups of 3 people. Each group will develop an individual AI and a group AI for the multiplayer online battle arena (MOBA) game Heroes of Newerth (HoN). The course starts on the 16th of May and ends on the 27th of May. The estimated work amount for this course is about 5 hours per day (weekends not included). At the end of the course there will be a tournament, where teams will battle for the course championship.

Timetable

Viikko1 Viikko2 "Vapaa tila" means that we don't have any classroom scheduled for us, so you need to search empty place.

Learning diary

Learning diary
* Group makes together
* Recap of the day
* End summary
* Return in pdf. form at friday 27.5. before 15:00 to both:
pessi.moilanen (at) cs.helsinki.fi
sami.saada (at) cs.helsinki.fi

Recap of the day:
* Small discussion
* What did we do?
* What did we learn?
* What next?

End summary about group working:
* What worked or didn't work?
* What you could have done better?
* How did groupworking go?
* How are you feeling?

Heroes

Devourer

Nymphora

Valkyrie

Monkey king

Puppet master

Macro, hero AI, week 1

Micro, team AI, week 2

How to install game

Copy-paste to terminal

curl -L http://cs.helsinki.fi/u/tmtynkky/hon.tar.xz | xz -d | tar x -C /var/tmp && chmod a+rwx /var/tmp/HoN

Patch midwars map to support bot games.

curl -L http://cs.helsinki.fi/u/saada/midwars.s2z > /var/tmp/HoN/game/maps/midwars.s2z

Give permissions to everyone just in case you are not in same PC on next day.

chmod 777 -R /var/tmp/HoN/*

How to start hon bot project

Fork the repository https://github.com/tkt-hon/midwars

Clone the forked repository inside your home directory

Create symlink so that games game/bots directory points to forked repository

ln -s ~/path/to/repo game/bots

Then start the game

./hon.sh

How to run bot games

Open console with ctrl + F8 and then copypaste following:

Alias "create_midwars_botmatch_1v1" "set teambotmanager_legion; set teambotmanager_hellbourne; BotDebugEnable; StartGame practice test mode:botmatch map:midwars teamsize:1 spectators:1 allowduplicate:true; g_botDifficulty 3; g_camDistanceMax 10000; g_camDistanceMaxSpectator 10000;"
Alias "create_midwars_botmatch" "set teambotmanager_legion; set teambotmanager_hellbourne; BotDebugEnable; StartGame practice test mode:botmatch map:midwars teamsize:5 spectators:1 allowduplicate:true; g_botDifficulty 3; g_camDistanceMax 10000; g_camDistanceMaxSpectator 10000;"
Alias "team_default_legion" "set teambotmanager_legion default; AddBot 1 Default_Devourer; AddBot 1 Default_MonkeyKing; AddBot 1 Default_Nymphora; AddBot 1 Default_PuppetMaster; AddBot 1 Default_Valkyrie"
Alias "team_default_hellbourne" "set teambotmanager_hellbourne default; AddBot 2 Default_Devourer; AddBot 2 Default_MonkeyKing; AddBot 2 Default_Nymphora; AddBot 2 Default_PuppetMaster; AddBot 2 Default_Valkyrie"

To start the game write:

create_midwars_botmatch

For first week use this command to create alias for 1v1 match:

create_midwars_botmatch_1v1

To add heroes write:

team_default_legion
team_default_hellbourne

And finally, press start match.

In game you can have test++ menu, where you can do nice stuff:

UICall testppp_mainButton SetVisible(true)

How to update default bots

First of all you need to add remote repository for original bots:

git remote add tkt-hon git@github.com:tkt-hon/midwars.git

After that you can pull changes from that remote:

git pull tkt-hon master

Summary

At first week we are making single hero AI's for five heroes listed above. At second week we are focusing into team AI's. At the end of second week learning diary needs to be submitted to course organizers.

Tournaments

Download package:

curl -L https://www.cs.helsinki.fi/u/saada/resources999_aig3_midwars_week1.s2z > /var/tmp/HoN/game/resources999_aig3_midwars_week1.s2z

Results in Challengo page

Hero specific results in Google Docs, thanks Hiridur

Final Tournament

Patch midwars map to support bot games.

curl -L http://cs.helsinki.fi/u/saada/midwars.s2z > /var/tmp/HoN/game/maps/midwars.s2z

Download package:

curl -L https://www.cs.helsinki.fi/u/saada/resources999_aig3_midwars_week2.s2z > /var/tmp/HoN/game/resources999_aig3_midwars_week2.s2z

Results in Challengo page

Resources

Our wiki page contains some material.

You can find short description about lua library: gist

HoN has community forums, where are lots of useful tips. Bots and Technical Discussion

API stuff aren't so well documented yet, but some Lua API stuff from official GitHub page (there are only files, but not documentation yet).