An open API service indexing awesome lists of open source software.

https://github.com/mp70/berghain-challenge-listen

Solving the listenlabs berghain challenge.
https://github.com/mp70/berghain-challenge-listen

constraintsolver

Last synced: 9 months ago
JSON representation

Solving the listenlabs berghain challenge.

Awesome Lists containing this project

README

          

# Berghain Challenge Solver

A zero-dependency TypeScript implementation for solving the Berghain Challenge.

## Build

Since there are only dev dependencies, install and build with:

```bash
npm install
npm run build
```

## Usage

### Basic Commands

Run a single scenario:
```bash
npm run solve -- --scenario 2
```

Run with continuously (with parallel processing):
```bash
npm run solve -- --scenario 2 --parallel 2
```

Run with batching:
```bash
npm run solve -- --scenario 2 --parallel 2 --batches 1
```

### Parameter Tuning

Basic tuning with default parameters:
```bash
npm run tune -- --scenario 2
```

Advanced tuning with custom parameters:
```bash
# Fine-grained search with more evaluations per candidate
npm run tune -- --scenario 2 --gridSize 7 --evalsPerCandidate 10

# Fast exploration with fewer evaluations
npm run tune -- --scenario 2 --gridSize 3 --evalsPerCandidate 3

# Multi-threaded tuning for faster results
npm run tune -- --scenario 2 --gridSize 5 --evalsPerCandidate 5 --threads 8

# Custom output file
npm run tune -- --scenario 2 --gridSize 5 --evalsPerCandidate 5 --outputFile my_config.json
```

**Tuning Parameters:**
- `--scenario`: Scenario to tune (1, 2, or 3) - **required**
- `--gridSize`: Grid resolution for parameter search (default: 5, higher = more thorough)
- `--evalsPerCandidate`: Evaluations per parameter combination (default: 5, higher = more reliable)
- `--threads`: Number of parallel threads (default: 4)
- `--outputFile`: Output file name (default: optimal_config.json)

**Parameter Ranges Being Optimized:**
- `initialSelectivity`: 1.251-1.500 (safety buffer at game start)
- `finalSelectivity`: 0.251-0.500 (safety buffer at game end)
- `initialLearningRate`: 0.3-1.0 (attribute weight adaptation speed)
- `maxAttributeWeight`: 14-17 (maximum attribute importance)
- `endgameThreshold`: 20-33 (when to switch to endgame mode)

### Development

Run in development mode (no build required):
```bash
npm run dev -- --scenario 2 --parallel 2
```

## Results

We came in 31st place with a score of 8017 (out of 1331 participants).