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.3.tar.gz (549.0 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.3-py3-none-any.whl (600.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seamaster-0.0.3.tar.gz
  • Upload date:
  • Size: 549.0 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.3.tar.gz
Algorithm Hash digest
SHA256 14ef1735013e8c2ff501e1c736a678ba88091c6c0f1f941078f5786dab44b4c3
MD5 c271250002aaa85dc424ea4c3910d5df
BLAKE2b-256 2ac1220f59328b9caaff0dae8f9a2345c9307dc13ac662055acc9fab6c8b1101

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seamaster-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 600.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7db4228a0909045d1b80122c977561a3a9cd22f8aa14f7e83e278b5a8f4421a3
MD5 1b88a1927ad2b34352a8a2eb4017b45c
BLAKE2b-256 579dbf5f0d3d302b3ae463ebe1b9ad3d9ae7267d81b64a31911781f2048847d5

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