In this challenge you must optimise the movement of a group of pickers retrieving and packing items from around a warehouse.
Initially you will be given the map of the warehouse that includes the start location of each picker, the location of a number of fixtures that contain the inventory you need to pick and the location of the dispatch desks. You then must decide what order a picker should to retrieve items and take them to a dispatch desk for processing. Each picker has a load capacity, a list of items types they can carry and a movement speed, so selecting the right picker for the job is essential. Each item that requires picking has a size and item type (e.g. food, fragile etc) associated with it. Each pack station also has a throughput speed and a list of item types they accept so again careful planning is required to get the optimal solution.
The map of the warehouse is randomly generated but its size and features will be determined by the game style. Each picker when moving around the warehouse can only move in a north, east, south, west direction i.e. not diagonally. A picker cannot walk through a fixture or a dispatch desk however they can pass by another picker in the same location.
Every fixture has a pick difficulty and this is the length of time it take to remove one unit of an item from the fixture. If you have to pick two or more units then the amount of time required will vary based upon a formula where the second item takes half the time, the third item takes a third of the time, the forth item a quarter of the time etc. This calculation stops at ten units and every item after ten will take one tenth of the time. For example if you have a pick difficulty of 100 and you need to pick 13 items from this fixture the calculation will be as follows:
100+50+33.33+25+20+16.66+14.28+12.5+11.11+10+10+10+10 = 322.89
This would result in a pick time of 323 as all values are rounded up at the end of a calculation.
An example warehouse is show below:
The fixtures are shown in blue, pickers in green, dispatch desks in orange and empty floor space in grey.
At any point during the game you can submit a solution. The solution at a minimum should pick and dispatch every item. Your solution is then compared to your opponents and the person submitting the quickest solution will be the winner. If both players best solution takes the same amount of time then the player who submits the solution first will be the winner.
At the end of the game your best solution will be animated in the visualiser. Pickers will be displayed going around the warehouse collecting items, as an item is loaded from a fixture the the picker colour will change as they become loaded.
This game can be become increasingly complex the bigger the warehouse, the more inventory you add, the more pickers you have and the more dispatch stations you have available. As these variables increase you will get a population explosion making the problem unsolvable with brute force. Following some simple strategies listed below will help you create a bot that will return a reasonable solution.
The distance is the number of squares a picker must travel between two points in the warehouse. Having this information will help when deciding where in the warehouse your pickers should go next. There are various methods of calculating the distance but we recommend looking at A* search algorithm.
Sounds obvious but utilise all of your pickers. If only some of you pickers are able to carry certain types of inventory make sure they are used for this job and there is not a bottle necks. Remember a picker can carry multiple items if they have the available capacity.
If dispatching large items which are slow to process it may be a strategy for the picker to move between dispatch desks e.g. there are two desks close together and each has a processing speed of 10 and you want to send 2 units that are 100 in size, you would better off dropping 1 at one desk and 1 at the other.
When the game engine processes a move the time is rounded to the nearest whole unit so if a movement takes 1.1 units this will count as 2 units. This should be taken into consideration when combining moves as it might be better to take one path that is actually longer if you consider the fractional parts for example:
You have 3 moves that take 1.1, 2.1 and 3.1 the game engine will calculate the total move as 2+3+4=9
You have 3 moves that take 1.9, 1.9 and 3.9 the game engine will calculate the total move as 2+2+4=8
Solution 1 is actually shorter just adding the times together including the fractional parts but solution 2 is the best one to implement in the game due to the rounding.