feat(bot): add Assassin bot (Rust) — decapitation archetype

All units rush the nearest enemy core via BFS, ignoring enemy units
and economy. No perimeter defense — full commitment to core destruction.
Targets persist across turns for consistent pathing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
jedarden 2026-04-22 16:55:33 -04:00
parent 7e131d310f
commit f11d00a177
931 changed files with 3634 additions and 0 deletions

756
bots/assassin/Cargo.lock generated Normal file
View file

@ -0,0 +1,756 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "assassin-bot"
version = "0.1.0"
dependencies = [
"axum",
"hex",
"hmac",
"serde",
"serde_json",
"sha2",
"tokio",
"tracing",
"tracing-subscriber",
]
[[package]]
name = "atomic-waker"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "axum"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90"
dependencies = [
"axum-core",
"bytes",
"form_urlencoded",
"futures-util",
"http",
"http-body",
"http-body-util",
"hyper",
"hyper-util",
"itoa",
"matchit",
"memchr",
"mime",
"percent-encoding",
"pin-project-lite",
"serde_core",
"serde_json",
"serde_path_to_error",
"serde_urlencoded",
"sync_wrapper",
"tokio",
"tower",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "axum-core"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1"
dependencies = [
"bytes",
"futures-core",
"http",
"http-body",
"http-body-util",
"mime",
"pin-project-lite",
"sync_wrapper",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "bitflags"
version = "2.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "bytes"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "cfg-if"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "cpufeatures"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
[[package]]
name = "crypto-common"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"crypto-common",
"subtle",
]
[[package]]
name = "errno"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "form_urlencoded"
version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
dependencies = [
"percent-encoding",
]
[[package]]
name = "futures-channel"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
[[package]]
name = "futures-task"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
[[package]]
name = "futures-util"
version = "0.3.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
dependencies = [
"futures-core",
"futures-task",
"pin-project-lite",
"slab",
]
[[package]]
name = "generic-array"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
]
[[package]]
name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
name = "hmac"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
"digest",
]
[[package]]
name = "http"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
dependencies = [
"bytes",
"itoa",
]
[[package]]
name = "http-body"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184"
dependencies = [
"bytes",
"http",
]
[[package]]
name = "http-body-util"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a"
dependencies = [
"bytes",
"futures-core",
"http",
"http-body",
"pin-project-lite",
]
[[package]]
name = "httparse"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"
[[package]]
name = "httpdate"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hyper"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca"
dependencies = [
"atomic-waker",
"bytes",
"futures-channel",
"futures-core",
"http",
"http-body",
"httparse",
"httpdate",
"itoa",
"pin-project-lite",
"smallvec",
"tokio",
]
[[package]]
name = "hyper-util"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"
dependencies = [
"bytes",
"http",
"http-body",
"hyper",
"pin-project-lite",
"tokio",
"tower-service",
]
[[package]]
name = "itoa"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
name = "lazy_static"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
name = "libc"
version = "0.2.185"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
[[package]]
name = "lock_api"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "matchit"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "mime"
version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "mio"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
dependencies = [
"libc",
"wasi",
"windows-sys",
]
[[package]]
name = "nu-ansi-term"
version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
"windows-sys",
]
[[package]]
name = "once_cell"
version = "1.21.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
[[package]]
name = "parking_lot"
version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
"parking_lot_core",
]
[[package]]
name = "parking_lot_core"
version = "0.9.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
"windows-link",
]
[[package]]
name = "percent-encoding"
version = "2.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "pin-project-lite"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
dependencies = [
"proc-macro2",
]
[[package]]
name = "redox_syscall"
version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
"bitflags",
]
[[package]]
name = "ryu"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
[[package]]
name = "scopeguard"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "serde_path_to_error"
version = "0.1.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457"
dependencies = [
"itoa",
"serde",
"serde_core",
]
[[package]]
name = "serde_urlencoded"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
"itoa",
"ryu",
"serde",
]
[[package]]
name = "sha2"
version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "sharded-slab"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]]
name = "signal-hook-registry"
version = "1.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
dependencies = [
"errno",
"libc",
]
[[package]]
name = "slab"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
[[package]]
name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "socket2"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
dependencies = [
"libc",
"windows-sys",
]
[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "sync_wrapper"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
[[package]]
name = "thread_local"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
dependencies = [
"cfg-if",
]
[[package]]
name = "tokio"
version = "1.52.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6"
dependencies = [
"bytes",
"libc",
"mio",
"parking_lot",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"windows-sys",
]
[[package]]
name = "tokio-macros"
version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tower"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"
dependencies = [
"futures-core",
"futures-util",
"pin-project-lite",
"sync_wrapper",
"tokio",
"tower-layer",
"tower-service",
"tracing",
]
[[package]]
name = "tower-layer"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"
[[package]]
name = "tower-service"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"log",
"pin-project-lite",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tracing-core"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
]
[[package]]
name = "tracing-log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log",
"once_cell",
"tracing-core",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
dependencies = [
"nu-ansi-term",
"sharded-slab",
"smallvec",
"thread_local",
"tracing-core",
"tracing-log",
]
[[package]]
name = "typenum"
version = "1.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de"
[[package]]
name = "unicode-ident"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
[[package]]
name = "valuable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
[[package]]
name = "zmij"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"

20
bots/assassin/Cargo.toml Normal file
View file

@ -0,0 +1,20 @@
[package]
name = "assassin-bot"
version = "0.1.0"
edition = "2021"
[dependencies]
axum = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }
hmac = "0.12"
sha2 = "0.10"
hex = "0.4"
tracing = "0.1"
tracing-subscriber = "0.3"
[profile.release]
strip = true
opt-level = "z"
lto = true

21
bots/assassin/Dockerfile Normal file
View file

@ -0,0 +1,21 @@
# Build stage
FROM rust:1.85-alpine AS builder
WORKDIR /app
COPY Cargo.toml ./
COPY src ./src
RUN cargo build --release
# Runtime stage
FROM alpine:3.21
WORKDIR /app
COPY --from=builder /app/target/release/assassin-bot /app/assassin-bot
ENV BOT_PORT=8082
ENV BOT_SECRET=""
EXPOSE 8082
CMD ["./assassin-bot"]

130
bots/assassin/src/game.rs Normal file
View file

@ -0,0 +1,130 @@
//! Game state types for AI Code Battle protocol.
use serde::{Deserialize, Serialize};
/// Position on the grid
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct Position {
pub row: i32,
pub col: i32,
}
/// Game configuration
#[derive(Debug, Clone, Deserialize)]
pub struct GameConfig {
pub rows: u32,
pub cols: u32,
pub max_turns: u32,
pub vision_radius2: u32,
pub attack_radius2: u32,
pub spawn_cost: u32,
pub energy_interval: u32,
}
/// Player info
#[derive(Debug, Clone, Deserialize)]
pub struct PlayerInfo {
pub id: u32,
pub energy: u32,
pub score: u32,
}
/// Visible bot
#[derive(Debug, Clone, Deserialize)]
pub struct VisibleBot {
pub position: Position,
pub owner: u32,
}
/// Visible core
#[derive(Debug, Clone, Deserialize)]
pub struct VisibleCore {
pub position: Position,
pub owner: u32,
pub active: bool,
}
/// Fog-filtered game state visible to this bot
#[derive(Debug, Clone, Deserialize)]
pub struct GameState {
pub match_id: String,
pub turn: u32,
pub config: GameConfig,
pub you: PlayerInfo,
#[serde(default)]
pub bots: Vec<VisibleBot>,
#[serde(default)]
pub energy: Vec<Position>,
#[serde(default)]
pub cores: Vec<VisibleCore>,
#[serde(default)]
pub walls: Vec<Position>,
#[serde(default)]
pub dead: Vec<VisibleBot>,
}
/// Movement direction
#[derive(Debug, Clone, Copy, Serialize)]
pub enum Direction {
#[serde(rename = "N")]
N,
#[serde(rename = "E")]
E,
#[serde(rename = "S")]
S,
#[serde(rename = "W")]
W,
}
/// A single move command
#[derive(Debug, Clone, Serialize)]
pub struct Move {
pub position: Position,
pub direction: Direction,
}
/// Response containing moves
#[derive(Debug, Clone, Serialize)]
pub struct MoveResponse {
pub moves: Vec<Move>,
}
impl Direction {
/// All directions in order: N, E, S, W
pub fn all() -> [Direction; 4] {
[Direction::N, Direction::E, Direction::S, Direction::W]
}
}
impl Position {
/// Move in a direction, wrapping around the toroidal grid
pub fn move_toward(&self, dir: Direction, rows: i32, cols: i32) -> Position {
match dir {
Direction::N => Position {
row: (self.row - 1 + rows) % rows,
col: self.col,
},
Direction::E => Position {
row: self.row,
col: (self.col + 1) % cols,
},
Direction::S => Position {
row: (self.row + 1) % rows,
col: self.col,
},
Direction::W => Position {
row: self.row,
col: (self.col - 1 + cols) % cols,
},
}
}
/// Calculate squared distance with toroidal wrapping
pub fn distance2(&self, other: &Position, rows: i32, cols: i32) -> u32 {
let dr = (self.row - other.row).abs();
let dc = (self.col - other.col).abs();
let dr = dr.min(rows - dr);
let dc = dc.min(cols - dc);
(dr * dr + dc * dc) as u32
}
}

150
bots/assassin/src/main.rs Normal file
View file

@ -0,0 +1,150 @@
//! AssassinBot - Decapitation archetype. All units rush the enemy core.
//!
//! Ignores enemy units and economy; pushes straight for the enemy core.
//! No perimeter defense — commits fully.
mod game;
mod strategy;
use axum::{
extract::State,
http::{HeaderMap, StatusCode},
routing::{get, post},
Json, Router,
};
use game::{GameState, MoveResponse};
use hmac::{Hmac, Mac};
use sha2::{Digest, Sha256};
use std::env;
use std::sync::Arc;
use strategy::AssassinStrategy;
use tokio::sync::Mutex;
use tracing::{info, Level};
use tracing_subscriber::FmtSubscriber;
type HmacSha256 = Hmac<Sha256>;
struct BotState {
secret: String,
strategy: AssassinStrategy,
}
#[tokio::main]
async fn main() {
let subscriber = FmtSubscriber::builder()
.with_max_level(Level::INFO)
.finish();
tracing::subscriber::set_global_default(subscriber).expect("Failed to set subscriber");
let port = env::var("BOT_PORT").unwrap_or_else(|_| "8082".to_string());
let secret = env::var("BOT_SECRET").expect("BOT_SECRET environment variable is required");
let state = Arc::new(Mutex::new(BotState {
secret,
strategy: AssassinStrategy::new(),
}));
let app = Router::new()
.route("/turn", post(handle_turn))
.route("/health", get(handle_health))
.with_state(state);
let addr = format!("0.0.0.0:{}", port);
info!("AssassinBot starting on {}", addr);
let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
axum::serve(listener, app).await.unwrap();
}
async fn handle_turn(
State(state): State<Arc<Mutex<BotState>>>,
headers: HeaderMap,
body: String,
) -> Result<Json<MoveResponse>, StatusCode> {
let match_id = headers
.get("X-ACB-Match-Id")
.and_then(|v| v.to_str().ok())
.ok_or(StatusCode::UNAUTHORIZED)?;
let turn_str = headers
.get("X-ACB-Turn")
.and_then(|v| v.to_str().ok())
.ok_or(StatusCode::UNAUTHORIZED)?;
let timestamp = headers
.get("X-ACB-Timestamp")
.and_then(|v| v.to_str().ok())
.ok_or(StatusCode::UNAUTHORIZED)?;
let signature = headers
.get("X-ACB-Signature")
.and_then(|v| v.to_str().ok())
.ok_or(StatusCode::UNAUTHORIZED)?;
let mut state = state.lock().await;
if !verify_signature(&state.secret, match_id, turn_str, timestamp, &body, signature) {
return Err(StatusCode::UNAUTHORIZED);
}
let game_state: GameState = serde_json::from_str(&body).map_err(|_| StatusCode::BAD_REQUEST)?;
let moves = state.strategy.compute_moves(&game_state);
let turn: u32 = turn_str.parse().unwrap_or(0);
info!("Turn {}: {} moves computed", turn, moves.len());
let response = MoveResponse { moves };
let _response_sig = {
let response_body = serde_json::to_string(&response).unwrap();
sign_response(&state.secret, match_id, turn, &response_body)
};
Ok(Json(response))
}
async fn handle_health() -> &'static str {
"OK"
}
fn verify_signature(
secret: &str,
match_id: &str,
turn: &str,
timestamp: &str,
body: &str,
signature: &str,
) -> bool {
let body_hash = sha2::Sha256::digest(body.as_bytes());
let body_hash_hex = hex::encode(body_hash);
let signing_string = format!("{}.{}.{}.{}", match_id, turn, timestamp, body_hash_hex);
let mut mac = match HmacSha256::new_from_slice(secret.as_bytes()) {
Ok(m) => m,
Err(_) => return false,
};
mac.update(signing_string.as_bytes());
let expected = hex::encode(mac.finalize().into_bytes());
hmac_equal(signature, &expected)
}
fn sign_response(secret: &str, match_id: &str, turn: u32, body: &str) -> String {
let body_hash = sha2::Sha256::digest(body.as_bytes());
let body_hash_hex = hex::encode(body_hash);
let signing_string = format!("{}.{}.{}", match_id, turn, body_hash_hex);
let mut mac = HmacSha256::new_from_slice(secret.as_bytes()).unwrap();
mac.update(signing_string.as_bytes());
hex::encode(mac.finalize().into_bytes())
}
fn hmac_equal(a: &str, b: &str) -> bool {
if a.len() != b.len() {
return false;
}
a.as_bytes()
.iter()
.zip(b.as_bytes().iter())
.fold(0, |acc, (x, y)| acc | (x ^ y))
== 0
}

View file

@ -0,0 +1,206 @@
//! Assassin strategy: decapitation archetype — all units rush the enemy core.
//!
//! Ignores economy, ignores enemy units (unless directly blocking), and commits
//! fully to core destruction. No perimeter defense. Relies on speed and mass.
use crate::game::{Direction, GameConfig, GameState, Move, Position};
use std::collections::{HashMap, HashSet, VecDeque};
pub struct AssassinStrategy {
/// Enemy cores discovered so far (persisted across turns)
known_targets: HashMap<Position, bool>,
}
impl AssassinStrategy {
pub fn new() -> Self {
Self {
known_targets: HashMap::new(),
}
}
pub fn compute_moves(&mut self, state: &GameState) -> Vec<Move> {
let my_id = state.you.id;
let config = &state.config;
let rows = config.rows as i32;
let cols = config.cols as i32;
self.update_targets(state, my_id);
let my_bots: Vec<_> = state.bots.iter().filter(|b| b.owner == my_id).collect();
if my_bots.is_empty() {
return vec![];
}
let walls: HashSet<Position> = state.walls.iter().copied().collect();
// Active enemy core targets, sorted by distance from our center of mass
let targets = self.active_targets();
let center = center_of_mass(&my_bots);
let mut sorted_targets: Vec<Position> = targets
.iter()
.filter(|(_, active)| **active)
.map(|(pos, _)| *pos)
.collect();
sorted_targets.sort_by_key(|t| center.distance2(t, rows, cols));
// If no known targets, explore outward
if sorted_targets.is_empty() {
return self.explore_moves(&my_bots, &walls, config);
}
// Primary target: nearest active enemy core to our center of mass
let primary = sorted_targets[0];
// BFS from each bot to the primary target, walking through enemies
let mut moves = Vec::with_capacity(my_bots.len());
let mut destinations: HashSet<Position> = HashSet::new();
for bot in &my_bots {
if let Some(dir) = self.bfs_toward(bot.position, primary, &walls, &destinations, rows, cols) {
let dest = bot.position.move_toward(dir, rows, cols);
destinations.insert(dest);
moves.push(Move {
position: bot.position,
direction: dir,
});
}
}
moves
}
/// Update known targets from visible cores
fn update_targets(&mut self, state: &GameState, my_id: u32) {
for core in &state.cores {
if core.owner != my_id {
self.known_targets
.entry(core.position)
.and_modify(|a| *a = core.active)
.or_insert(core.active);
}
}
}
fn active_targets(&self) -> &HashMap<Position, bool> {
&self.known_targets
}
/// BFS toward a target position. Unlike rusher, does NOT avoid enemy bots —
/// we walk straight through them. Only walls block movement.
/// Avoids self-collision by checking already-claimed destinations.
fn bfs_toward(
&self,
start: Position,
goal: Position,
walls: &HashSet<Position>,
claimed: &HashSet<Position>,
rows: i32,
cols: i32,
) -> Option<Direction> {
if start == goal {
return None;
}
let mut visited: HashSet<Position> = HashSet::new();
let mut queue: VecDeque<(Position, Option<Direction>)> = VecDeque::new();
visited.insert(start);
queue.push_back((start, None));
while let Some((pos, first_dir)) = queue.pop_front() {
if pos == goal {
return first_dir;
}
for dir in Direction::all() {
let next = pos.move_toward(dir, rows, cols);
if visited.contains(&next) || walls.contains(&next) {
continue;
}
visited.insert(next);
queue.push_back((next, first_dir.or(Some(dir))));
}
}
// No path to goal — pick the direction that gets us closest
let mut best_dir = None;
let mut best_dist = i32::MAX;
for dir in Direction::all() {
let next = start.move_toward(dir, rows, cols);
if walls.contains(&next) || claimed.contains(&next) {
continue;
}
let dr = (next.row - goal.row).abs();
let dc = (next.col - goal.col).abs();
let dist = dr.min(rows - dr) + dc.min(cols - dc);
if dist < best_dist {
best_dist = dist;
best_dir = Some(dir);
}
}
best_dir
}
/// When no targets are known, spread bots outward to find enemy cores
fn explore_moves(
&self,
my_bots: &[&crate::game::VisibleBot],
walls: &HashSet<Position>,
config: &GameConfig,
) -> Vec<Move> {
let rows = config.rows as i32;
let cols = config.cols as i32;
let mut moves = Vec::with_capacity(my_bots.len());
// Spread in a line toward the opposite side of the map
for (i, bot) in my_bots.iter().enumerate() {
let target_col = if i % 2 == 0 { cols - 1 } else { 0 };
let target_row = if i % 3 == 0 { rows / 2 } else { rows - 1 };
let target = Position { row: target_row, col: target_col };
let mut best_dir = None;
let mut best_dist = i32::MAX;
for dir in Direction::all() {
let next = bot.position.move_toward(dir, rows, cols);
if walls.contains(&next) {
continue;
}
let dr = (next.row - target.row).abs();
let dc = (next.col - target.col).abs();
let dist = dr.min(rows - dr) + dc.min(cols - dc);
if dist < best_dist {
best_dist = dist;
best_dir = Some(dir);
}
}
if let Some(dir) = best_dir {
moves.push(Move {
position: bot.position,
direction: dir,
});
}
}
moves
}
}
impl Default for AssassinStrategy {
fn default() -> Self {
Self::new()
}
}
/// Compute center of mass of our bots
fn center_of_mass(bots: &[&crate::game::VisibleBot]) -> Position {
if bots.is_empty() {
return Position { row: 0, col: 0 };
}
let sum_r: i32 = bots.iter().map(|b| b.position.row).sum();
let sum_c: i32 = bots.iter().map(|b| b.position.col).sum();
Position {
row: sum_r / bots.len() as i32,
col: sum_c / bots.len() as i32,
}
}

View file

@ -0,0 +1 @@
{"rustc_fingerprint":10019768534961353947,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.94.0 (4a4ef493e 2026-03-02)\nbinary: rustc\ncommit-hash: 4a4ef493e3a1488c6e321570238084b38948f6db\ncommit-date: 2026-03-02\nhost: x86_64-unknown-linux-gnu\nrelease: 1.94.0\nLLVM version: 21.1.8\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/coding/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}

View file

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

View file

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":1027386249473115493,"profile":8731458305071235362,"path":4942398508502643691,"deps":[[530211389790465181,"hex",false,5584180678146921932],[1566171736144735121,"tokio",false,1621117743885515504],[5380358770761950913,"tracing_subscriber",false,9700485061643589817],[9209347893430674936,"hmac",false,137332085929157690],[9842033052731393846,"axum",false,12375401236577254018],[9857275760291862238,"sha2",false,10825677213252363592],[13548984313718623784,"serde",false,16179211503699846699],[13795362694956882968,"serde_json",false,14781373332355765686],[14757622794040968908,"tracing",false,17958889613934655556]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assassin-bot-c5bfcf953aa19485/dep-bin-assassin-bot","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1,5 @@
{"$message_type":"diagnostic","message":"fields `max_turns`, `vision_radius2`, `attack_radius2`, `spawn_cost`, and `energy_interval` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/game.rs","byte_start":321,"byte_end":331,"line_start":14,"line_end":14,"column_start":12,"column_end":22,"is_primary":false,"text":[{"text":"pub struct GameConfig {","highlight_start":12,"highlight_end":22}],"label":"fields in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":380,"byte_end":389,"line_start":17,"line_end":17,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":" pub max_turns: u32,","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":404,"byte_end":418,"line_start":18,"line_end":18,"column_start":9,"column_end":23,"is_primary":true,"text":[{"text":" pub vision_radius2: u32,","highlight_start":9,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":433,"byte_end":447,"line_start":19,"line_end":19,"column_start":9,"column_end":23,"is_primary":true,"text":[{"text":" pub attack_radius2: u32,","highlight_start":9,"highlight_end":23}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":462,"byte_end":472,"line_start":20,"line_end":20,"column_start":9,"column_end":19,"is_primary":true,"text":[{"text":" pub spawn_cost: u32,","highlight_start":9,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":487,"byte_end":502,"line_start":21,"line_end":21,"column_start":9,"column_end":24,"is_primary":true,"text":[{"text":" pub energy_interval: u32,","highlight_start":9,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`GameConfig` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"`#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: fields `max_turns`, `vision_radius2`, `attack_radius2`, `spawn_cost`, and `energy_interval` are never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/game.rs:17:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m14\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct GameConfig {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m----------\u001b[0m \u001b[1m\u001b[94mfields in this struct\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m17\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub max_turns: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m18\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub vision_radius2: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m19\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub attack_radius2: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m20\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub spawn_cost: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m21\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub energy_interval: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^^^^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `GameConfig` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default\n\n"}
{"$message_type":"diagnostic","message":"fields `energy` and `score` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/game.rs","byte_start":576,"byte_end":586,"line_start":26,"line_end":26,"column_start":12,"column_end":22,"is_primary":false,"text":[{"text":"pub struct PlayerInfo {","highlight_start":12,"highlight_end":22}],"label":"fields in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":614,"byte_end":620,"line_start":28,"line_end":28,"column_start":9,"column_end":15,"is_primary":true,"text":[{"text":" pub energy: u32,","highlight_start":9,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":635,"byte_end":640,"line_start":29,"line_end":29,"column_start":9,"column_end":14,"is_primary":true,"text":[{"text":" pub score: u32,","highlight_start":9,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`PlayerInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: fields `energy` and `score` are never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/game.rs:28:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m26\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct PlayerInfo {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m----------\u001b[0m \u001b[1m\u001b[94mfields in this struct\u001b[0m\n\u001b[1m\u001b[94m27\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub id: u32,\n\u001b[1m\u001b[94m28\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub energy: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m\n\u001b[1m\u001b[94m29\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub score: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `PlayerInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis\n\n"}
{"$message_type":"diagnostic","message":"fields `match_id`, `turn`, `energy`, and `dead` are never read","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/game.rs","byte_start":1026,"byte_end":1035,"line_start":49,"line_end":49,"column_start":12,"column_end":21,"is_primary":false,"text":[{"text":"pub struct GameState {","highlight_start":12,"highlight_end":21}],"label":"fields in this struct","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":1046,"byte_end":1054,"line_start":50,"line_end":50,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":" pub match_id: String,","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":1072,"byte_end":1076,"line_start":51,"line_end":51,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" pub turn: u32,","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":1219,"byte_end":1225,"line_start":57,"line_end":57,"column_start":9,"column_end":15,"is_primary":true,"text":[{"text":" pub energy: Vec<Position>,","highlight_start":9,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/game.rs","byte_start":1379,"byte_end":1383,"line_start":63,"line_end":63,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":" pub dead: Vec<VisibleBot>,","highlight_start":9,"highlight_end":13}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`GameState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: fields `match_id`, `turn`, `energy`, and `dead` are never read\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/game.rs:50:9\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m49\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub struct GameState {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[94m---------\u001b[0m \u001b[1m\u001b[94mfields in this struct\u001b[0m\n\u001b[1m\u001b[94m50\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub match_id: String,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\u001b[1m\u001b[94m51\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub turn: u32,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m57\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub energy: Vec<Position>,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m\n\u001b[1m\u001b[94m...\u001b[0m\n\u001b[1m\u001b[94m63\u001b[0m \u001b[1m\u001b[94m|\u001b[0m pub dead: Vec<VisibleBot>,\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^\u001b[0m\n \u001b[1m\u001b[94m|\u001b[0m\n \u001b[1m\u001b[94m= \u001b[0m\u001b[1mnote\u001b[0m: `GameState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis\n\n"}
{"$message_type":"diagnostic","message":"struct `Target` is never constructed","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/strategy.rs","byte_start":459,"byte_end":465,"line_start":11,"line_end":11,"column_start":8,"column_end":14,"is_primary":true,"text":[{"text":"struct Target {","highlight_start":8,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: struct `Target` is never constructed\u001b[0m\n \u001b[1m\u001b[94m--> \u001b[0msrc/strategy.rs:11:8\n \u001b[1m\u001b[94m|\u001b[0m\n\u001b[1m\u001b[94m11\u001b[0m \u001b[1m\u001b[94m|\u001b[0m struct Target {\n \u001b[1m\u001b[94m|\u001b[0m \u001b[1m\u001b[33m^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"4 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[1m\u001b[33mwarning\u001b[0m\u001b[1m: 4 warnings emitted\u001b[0m\n\n"}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"portable-atomic\"]","target":14411119108718288063,"profile":15657897354478470176,"path":17026116168268035426,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/atomic-waker-60d48cad28c8a968/dep-lib-atomic_waker","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
82fa1d63db41beab

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"default\", \"form\", \"http1\", \"json\", \"matched-path\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\"]","declared_features":"[\"__private\", \"__private_docs\", \"default\", \"form\", \"http1\", \"http2\", \"json\", \"macros\", \"matched-path\", \"multipart\", \"original-uri\", \"query\", \"tokio\", \"tower-log\", \"tracing\", \"ws\"]","target":13920321295547257648,"profile":974010408556427334,"path":14904846599300409763,"deps":[[784494742817713399,"tower_service",false,13305184298995834969],[1074175012458081222,"form_urlencoded",false,7672451034578695753],[1363051979936526615,"memchr",false,8235403765039440231],[1566171736144735121,"tokio",false,1621117743885515504],[2251399859588827949,"pin_project_lite",false,11355472861500397828],[2517136641825875337,"sync_wrapper",false,14567277875710751817],[2620434475832828286,"http",false,8032744630643961255],[3626672138398771397,"hyper",false,3188323108202011615],[3632162862999675140,"tower",false,6118088133901665298],[3870702314125662939,"bytes",false,17817214833777980579],[5532778797167691009,"itoa",false,7855517222326032530],[5898568623609459682,"futures_util",false,5278395486158361994],[6803352382179706244,"percent_encoding",false,461658520990986188],[7712452662827335977,"tower_layer",false,8804682043506760053],[8502962237732707896,"axum_core",false,8136685010371594996],[8913795983780778928,"matchit",false,9527630185996817915],[10229185211513642314,"mime",false,14444716265139994860],[11899261697793765154,"serde_core",false,7606449435711947375],[11976082518617474977,"hyper_util",false,17229797969550962750],[13795362694956882968,"serde_json",false,14781373332355765686],[14084095096285906100,"http_body",false,4372768332317193180],[14757622794040968908,"tracing",false,17958889613934655556],[14814583949208169760,"serde_path_to_error",false,14149217969974971497],[16542808166767769916,"serde_urlencoded",false,17550126855516701198],[16900715236047033623,"http_body_util",false,13913784422279969400]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-45706893d4b7a4b2/dep-lib-axum","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
f4ca712ce84feb70

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"tracing\"]","declared_features":"[\"__private_docs\", \"tracing\"]","target":2565713999752801252,"profile":1972285046825438654,"path":16084064814270034015,"deps":[[302948626015856208,"futures_core",false,9199859710052164499],[784494742817713399,"tower_service",false,13305184298995834969],[2251399859588827949,"pin_project_lite",false,11355472861500397828],[2517136641825875337,"sync_wrapper",false,14567277875710751817],[2620434475832828286,"http",false,8032744630643961255],[3870702314125662939,"bytes",false,17817214833777980579],[7712452662827335977,"tower_layer",false,8804682043506760053],[10229185211513642314,"mime",false,14444716265139994860],[14084095096285906100,"http_body",false,4372768332317193180],[14757622794040968908,"tracing",false,17958889613934655556],[16900715236047033623,"http_body_util",false,13913784422279969400]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/axum-core-4d5fad45261c2462/dep-lib-axum_core","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":4098124618827574291,"profile":15657897354478470176,"path":17940744091161969163,"deps":[[10520923840501062997,"generic_array",false,14401011070018319030]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/block-buffer-f9be68bdcec29318/dep-lib-block_buffer","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
a33428de7d7643f7

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"extra-platforms\", \"serde\", \"std\"]","target":11402411492164584411,"profile":5585765287293540646,"path":1549388640257901949,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/bytes-7700b1df813bc0a9/dep-lib-bytes","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
d4b925cb4f3d9b22

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"core\", \"rustc-dep-of-std\"]","target":13840298032947503755,"profile":15657897354478470176,"path":14141556616321478708,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-9d8e838b3d041728/dep-lib-cfg_if","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
e777937ba5acb782

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":2330704043955282025,"profile":15657897354478470176,"path":10103180320517581917,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cpufeatures-0682f7078379b6b3/dep-lib-cpufeatures","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"std\"]","declared_features":"[\"getrandom\", \"rand_core\", \"std\"]","target":12082577455412410174,"profile":15657897354478470176,"path":8305438330929323465,"deps":[[10054219943184136400,"typenum",false,17642559953430629495],[10520923840501062997,"generic_array",false,14401011070018319030]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/crypto-common-bc21d7b4dfa2c6e7/dep-lib-crypto_common","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
86cc4e1e2194058e

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"block-buffer\", \"core-api\", \"default\", \"mac\", \"std\", \"subtle\"]","declared_features":"[\"alloc\", \"blobby\", \"block-buffer\", \"const-oid\", \"core-api\", \"default\", \"dev\", \"mac\", \"oid\", \"rand_core\", \"std\", \"subtle\"]","target":7510122432137863311,"profile":15657897354478470176,"path":4165273518167630456,"deps":[[6039282458970808711,"crypto_common",false,13846294944812300707],[10626340395483396037,"block_buffer",false,18066512662214586618],[17003143334332120809,"subtle",false,7466396639002956660]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/digest-9c97870d785e5714/dep-lib-digest","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
eb9fb24bd3e6cb4c

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":17743456753391690785,"profile":695948416215102338,"path":9144580266493606168,"deps":[[17799673680390999427,"libc",false,2774838093296816303]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/errno-8dfbd49fd880a5d0/dep-lib-errno","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"std\"]","target":6496257856677244489,"profile":15657897354478470176,"path":7213413549912673117,"deps":[[6803352382179706244,"percent_encoding",false,461658520990986188]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/form_urlencoded-c4f6050961d1d3f4/dep-lib-form_urlencoded","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"cfg-target-has-atomic\", \"default\", \"futures-sink\", \"sink\", \"std\", \"unstable\"]","target":13634065851578929263,"profile":13318305459243126790,"path":11001189364839492387,"deps":[[302948626015856208,"futures_core",false,9199859710052164499]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/futures-channel-ced8372dda652cf2/dep-lib-futures_channel","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"cfg-target-has-atomic\", \"default\", \"portable-atomic\", \"std\", \"unstable\"]","target":9453135960607436725,"profile":13318305459243126790,"path":8031175873885471320,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/futures-core-a6049477db3e920d/dep-lib-futures_core","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"cfg-target-has-atomic\", \"default\", \"std\", \"unstable\"]","target":13518091470260541623,"profile":13318305459243126790,"path":12069802583768895801,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/futures-task-76de97b35dc2c42b/dep-lib-futures_task","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"slab\"]","declared_features":"[\"alloc\", \"async-await\", \"async-await-macro\", \"bilock\", \"cfg-target-has-atomic\", \"channel\", \"compat\", \"default\", \"futures-channel\", \"futures-io\", \"futures-macro\", \"futures-sink\", \"futures_01\", \"io\", \"io-compat\", \"libc\", \"memchr\", \"portable-atomic\", \"sink\", \"slab\", \"spin\", \"std\", \"tokio-io\", \"unstable\", \"write-all-vectored\"]","target":1788798584831431502,"profile":13318305459243126790,"path":2865913925567765956,"deps":[[302948626015856208,"futures_core",false,9199859710052164499],[2251399859588827949,"pin_project_lite",false,11355472861500397828],[12256881686772805731,"futures_task",false,17839932849823442383],[14895711841936801505,"slab",false,193128918581000563]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/futures-util-49ac7542c5b98327/dep-lib-futures_util","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"more_lengths\"]","declared_features":"[\"more_lengths\", \"serde\", \"zeroize\"]","target":12318548087768197662,"profile":2225463790103693989,"path":18071938149004386390,"deps":[[5398981501050481332,"version_check",false,14201778639757779625]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/generic-array-746f5eed457099c3/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[10520923840501062997,"build_script_build",false,14642764996555061726]],"local":[{"Precalculated":"0.14.7"}],"rustflags":[],"config":0,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"more_lengths\"]","declared_features":"[\"more_lengths\", \"serde\", \"zeroize\"]","target":13084005262763373425,"profile":15657897354478470176,"path":3918572384280450049,"deps":[[10054219943184136400,"typenum",false,17642559953430629495],[10520923840501062997,"build_script_build",false,14679578337420135531]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/generic-array-8e71b5d52fd5727c/dep-lib-generic_array","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
cc158c92bdfe7e4d

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"alloc\", \"default\", \"std\"]","declared_features":"[\"alloc\", \"default\", \"serde\", \"std\"]","target":4242469766639956503,"profile":15657897354478470176,"path":8736155654555109109,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/hex-a08e3650e8671746/dep-lib-hex","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
3a2412f6cde6e701

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[\"reset\", \"std\"]","target":12991177224612424488,"profile":15657897354478470176,"path":6981668586553414187,"deps":[[17475753849556516473,"digest",false,10233748598232632454]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/hmac-a46a0a572d65a857/dep-lib-hmac","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
a7adf5a8ae0a7a6f

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"std\"]","target":4766512060560342653,"profile":15657897354478470176,"path":17612956748848313302,"deps":[[3870702314125662939,"bytes",false,17817214833777980579],[5532778797167691009,"itoa",false,7855517222326032530]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/http-bd859b3c6ad2874c/dep-lib-http","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
dcf3d75ca131af3c

View file

@ -0,0 +1 @@
{"rustc":18276270781310494267,"features":"[]","declared_features":"[]","target":16652076073832724591,"profile":15657897354478470176,"path":7556355369837672396,"deps":[[2620434475832828286,"http",false,8032744630643961255],[3870702314125662939,"bytes",false,17817214833777980579]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/http-body-0b82d526501bf8d0/dep-lib-http_body","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

Some files were not shown because too many files have changed in this diff Show more