Skip to content

st/invaders

Repository files navigation

st/invaders

Installation

Download from https://github.com/st/invaders

Usage

$ clojure -M:run-m -r .../radar-sample.txt [-t threshold] [-x]

This will display:

  • the parameters used to run the application
  • the detections in a table
  • the ASCII representions of the detectable invaders (with their transformations if any)
  • the original radar sample
  • the radar sample overloaded with the detected invaders in red.

Run the project's tests:

$ clojure -T:build test

Examples

$ clojure -M:run-m -h 
> Will display usage

$ clojure -M:run-m -r .../radar-sample.txt
> Will run with default options and the given radar sample

$ clojure -M:run-m -r .../radar-sample.txt -t 0.9
> Will run with a threshold detection set to 90%. 
Allowed thresholds are in the range [0.5 1.0].
A low value increases the likelihood of false positives: an invader is detected multiple times at close locations.

$ clojure -M:run-m -r .../radar-sample.txt -t 0.7 -x
> Will also detect flipped versions of invaders   

Remarks

Algorithm

The algorithm used is brute force and not performance oriented. Each pixel of the radar sample is examined by comparing clips from radar with patterns. I stick to idiomatic Clojure and a limited set of dependencies.

AI?

I decided not to ask chatgpt any help. There are likely much better algorithms out there!

License

Copyright © 2025 Stephanetavera

EPLv1.0 is just the default for projects generated by deps-new: you are not required to open source this project, nor are you required to use EPLv1.0! Feel free to remove or change the LICENSE file and remove or update this section of the README.md file!

Distributed under the Eclipse Public License version 1.0.

About

Invaders assignment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published