elkuku/maxfield-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

elkuku/maxfield-bundle

Composer 安装命令:

composer require elkuku/maxfield-bundle

包简介

Ingress Maxfield: Linking and Fielding Strategy Generator - Symfony Bundle

README 文档

README

Symfony Bundle implementing Ingress Maxfield — generates optimal portal linking and fielding plans for the Ingress mobile game.

Installation

composer require elkuku/maxfield-bundle

Portal File Format

Create a plain text file with one portal per line:

# Lines starting with # are comments and are ignored

PortalName; IntelURL; [keys]; [SBUL]
Field Required Description
PortalName Yes Any name (no ; or # characters)
IntelURL Yes Intel map URL containing pll=lat,lon
keys No Number of keys already in inventory (integer)
SBUL No Mark portal as having a Softbank Ultra Link (raises outgoing link limit from 8 to 24)

Example:

# My operation portals
Town Hall; https://intel.ingress.com/intel?pll=38.032646,-78.477578; 3
Library; https://intel.ingress.com/intel?pll=38.032570,-78.477450
Post Office; https://intel.ingress.com/intel?pll=38.033100,-78.476900; 0; SBUL
  • Portals with duplicate coordinates are silently skipped.
  • A minimum of 3 portals is required to create any fields.

Usage

Console command

bin/console maxfield:plan <portal-file> [options]
Option Default Description
--num-agents / -n 1 Number of agents participating in the operation
--num-iterations 1000 Candidate field plans to generate; higher = better plan, slower
--max-route-solutions 1000 Max agent routing solutions to evaluate (multi-agent only)
--max-route-runtime 60 Max seconds for agent routing (multi-agent only)
--outdir / -o . Directory to write output files into (created if absent)
--output-csv off Also write machine-readable CSV files
--res-colors / -r off Use Resistance color scheme (informational only)

Examples:

# Single agent, defaults
bin/console maxfield:plan portals.txt

# Three agents, save to a specific directory, include CSV
bin/console maxfield:plan portals.txt --num-agents=3 --outdir=./output --output-csv

# Verbose output with more iterations for better quality
bin/console maxfield:plan portals.txt --num-iterations=5000 -v

PHP API

Inject MaxfieldPlanner and call run():

use Elkuku\MaxfieldBundle\Service\MaxfieldPlanner;

class MyController
{
    public function __construct(private readonly MaxfieldPlanner $planner) {}

    public function generate(): void
    {
        $plan = $this->planner->run(
            filename: '/path/to/portals.txt',
            numAgents: 2,
            numFieldIterations: 1000,
            maxRouteSolutions: 1000,
            maxRouteRuntime: 60,
            outdir: '/tmp/my-operation',
            outputCsv: true,
            verbose: false,
        );

        // $plan->graph->ap        — total AP
        // $plan->graph->numLinks  — number of links
        // $plan->graph->numFields — number of fields
        // $plan->assignments      — array of Assignment objects
    }
}

run() returns the completed Plan object and also writes all output files to $outdir.

Output Files

All files are written to the directory specified by --outdir.

File Description
key_preparation.txt Keys needed, in inventory, and still to farm — per portal
key_preparation.csv Same data in CSV format (--output-csv only)
ownership_preparation.txt Which portals need full resonators before linking begins
agent_key_preparation.txt Keys each individual agent needs to carry
agent_key_preparation.csv Same data in CSV format (--output-csv only)
agent_assignments.txt Full link order for all agents combined
agent_assignments.csv Same data in CSV format (--output-csv only)
agent_N_assignment.txt Individual assignment sheet for agent N

Reading the assignment files

Links must be made in the listed order. Each entry shows:

Link ; Agent ;   # ; Link Origin name
                 # ; Link Destination name
  • Link — global sequence number
  • Agent — which agent makes this link (1-based)
  • # — portal number on the portal map

统计信息

  • 总下载量: 42
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-03-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固