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.4.tar.gz (553.3 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.4-py3-none-any.whl (607.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seamaster-0.0.4.tar.gz
  • Upload date:
  • Size: 553.3 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.4.tar.gz
Algorithm Hash digest
SHA256 4150341c7c2431eed59fae7fea1bb0c41af6609f8c750494210b10c84d05ae6b
MD5 4430b84c1e45bb1f60da7215dfebd7f6
BLAKE2b-256 73d96db1de343679c0c1cd6422e68285165f570c9913dc3cb21daa67848c3fb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seamaster-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 607.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 73b7b070e7be89eb05c882002659260e81b49cf0a231331ce528d70ee9939923
MD5 02bb207eb300f5c7d219ab98119aa6bf
BLAKE2b-256 6e5129ded1f85553b4cfc941ce1d9bbf7678b803bda18c9aabbfffc8c5760949

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