Video of Torchbearer in action:

Torchbearer Video

Project Summary:

The Torchbearer AI assists players in placing down torches to increase the light level of their surroundings. Our AI knows an optimal solution is n-coordinate large; thus it only tries the n-large combinations. We also create an sort algorithms to sort those combinations so that our AI tries the combinations those are close the center (the center can light up more area in a nXn size area ) first then tries the outside combinations.

Approach:

The Torchbearer A.I. determines the best locations to place torches in a grid by first determining the minimum amount of torches needed to light up the whole grid, then iterating over an n-sized combination of the valid coordinates of the grid, scoring each combination based on how many squares it left dark.

In order to find all optimal solutions, we use brute-force method in our AI to make sure we won’t miss any possible one. However, the brute-force is very expensive not only on the space but also the time cost; thus, we first use a math formula to calculate the number of torches of a optimal solutions.

Evaluation:

With the optimization to small-sized grids and weighting towards the center squares, the speed aspect of testing has dramatically improved. Now the A.I. no longer iterates over the entire combinatorial grid looking for a solution; instead, it looks for the first n^2 solutions using the center as the base, as opposed to the nCr amount of solutions that would arise (not a problem at n = 7, where r would then equal 1 and thus the set of possible solutions equals 49; definitely a problem at n = 10, where r would then equal 3 and the set of possible solutions equals 161700.)

However, this changes it from a complete A.I. to a merely fast one, and one that cannot effectively find the solutions at that. Better results could be found by iterating randomly over the set of solutions; definitive results could be found by iterating over all solutions. In short, we sacrificed completeness for speed, which unfortunately fails the criteria we set for the A.I.

One of the reasons we had a problem with attempting submodular optimization of the problem is that submodular optimization is NP-Hard. Each attempt at making two or more grids that are smaller than the nXn grid (but still covering the same area) requires just as much thought and calculation as does simply iterating over the whole nCr combinations.

References:

https://las.inf.ethz.ch/files/krause12survey.pdf (Paper on Submodular Optimization.)