One Knight Stands against Joker

One Knight Stands against Joker

In Gotham, Joker's nabbed important spots. Batman's job? From one spot, he can move like a Knight, trying to grab as many squares as possible. Can the Dark Knight outsmart Joker's chaos? Let's find out!

Here is the map of the Gotham. The green cells area controlled by Joker.

Problem Formulation:

  1. The objective function is defined as maximizing the total capture cells by Batman.
  2. The number of entering to each cell is atmost one.
  3. The number of outgoing from each cell is atmost one.
  4. Nodal balance is ensured
  5. The transition from cell i to j is possible only if this path is selected by Uij

Let's assume the starting point of Natman is at Cell 27 !


Batman decided to use Pyomo for maximizing his success.

Here is the Pyomo code

Results:

The starting point is important , Le't assume Batman starts at cell 27.

The result is 14 cells.

Let's change the starting point and check the impact. 15 cells are rescued if Batman starts at cell 20

Let's change the starting point and check the impact. 15 cells are rescued if Batman starts at cell 13

How about if Joker changes it's locations ?

Let's start from cell 7. It will capture 14 cells.

The code is available on github.


Alireza Soroudi, PhD

Lead Data Scientist @ bluecrux || SMIEEE || Optimization expert in Supply chain management|| Healthcare management || Lab Digitalization || Power and Energy systems || Developer || Author / Speaker || (views are mine)

9 个月
回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了