Skip to content

petemud/grid-compression

Repository files navigation

This is a repo of my solution to Grid Compression Contest held by Algotester and sponsored by Huawei

Here are the task, the final scoreboard and my 1st place certificate.

Building

The build system is CMake so just run it. If you're not familiar with CMake try reading some docs.

Bootstraping

In order to send your solution to Algotester you have to have a single a file. Here is how you can get it: sh bootstrap.sh

Report

General idea

The general idea is to convert the grid into an undirected graph and find a MIS in it.

The graph's vertices is the set of rectangles and the edges is the set of pairs of intersecting rectangles. The conversion from grid to graph can be found here

The idea behind finding MIS is the same as in this paper:

  1. Generate random starting solution
  2. Improve it with (1,2)-swaps and plateau search
    My contribution is the observation that for grids with (1,x) or (x,1) rectangles (1<=x<=10) (1,2)-swaps without plateau search always give better results faster.

Further improvement

About

https://www.algotester.com/gcc/en

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors