Skip to main content

Seamaster is a package which helps users write and submit code to participate in the Seawars game.

Project description

Seamaster Bot Programming – User Guide

Note: This library is still under development, and the contents of this README might change in the future.

Seamaster is a strategy-based bot programming platform where you design autonomous bots that explore, harvest, fight, and survive in a grid-based world.

Key Mindset You do not control bots every turn. You define strategies, and bots follow them autonomously for their entire lifetime.

Core Philosophy

A bot is born with a strategy. It lives with that strategy. It dies with that strategy.

  • You define how a bot behaves
  • The engine decides when that behavior runs
  • You never micromanage bots after spawning

Architecture Overview

Layer Responsibility
User (user.py) Strategy logic only
BotContext Gives you methods to define your custom bot
Helpers Create actions (move, attack, etc.)

You only write user.py.


Bots = Strategies

Each bot type is a Python class.

class Forager(BotController):
    def act(self):
        ...

Define your complete bot strategy here and execute!

Some Examples:

Adding extra abilities while spawning bots and using botcontext

    def play(api: GameAPI):
    actions = []

    if api.view.bot_count < api.view.max_bots:
        abilities = [
            Ability.HARVEST.value,
            Ability.SCOUT.value,
            Ability.SPEED.value,          # EXTRA ability
            Ability.SELF_DESTRUCT.value,  # EXTRA ability
        ]

        if can_afford(api, abilities):
            actions.append(
                spawn("HeatSeeker", abilities)
            )

    return actions

OR like this:

actions.append(
    spawn(
        "CustomBot",
        [
            Ability.HARVEST.value,
            Ability.SCOUT.value,
            Ability.SPEED.value,
        ]
    )
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seamaster-0.0.2.tar.gz (548.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seamaster-0.0.2-py3-none-any.whl (600.3 kB view details)

Uploaded Python 3

File details

Details for the file seamaster-0.0.2.tar.gz.

File metadata

  • Download URL: seamaster-0.0.2.tar.gz
  • Upload date:
  • Size: 548.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for seamaster-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dd53e9be7d32e6a7e3e4cc32146c3f6fe9b1b9f28ddeed28e2b2b68104ceb868
MD5 62c2c646d1992bdf27f9f415d9309327
BLAKE2b-256 d10a6492a05b7c9b4937fd09ec1dceb32666b76c85c86615fc0088292cbacfca

See more details on using hashes here.

File details

Details for the file seamaster-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: seamaster-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 600.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for seamaster-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35082d67361c2337151c7f7395272aa8ef79c171342c37fb35ba659fde32e777
MD5 1f5dc02039aa73139ca100269db7969e
BLAKE2b-256 fe0cd35b9937da4135f40d264e3cebf2d8cc582b70e9a5299c375d148f8be878

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page