How We Engineered Robust AI Strategies for Huawei’s Software Elite Challenge

This article recounts the team’s motivation, algorithmic design, and game‑theoretic tactics—from simple BFS robot navigation and collision avoidance to advanced ship routing and purchase strategies—used across the preliminary, semi‑final, and final rounds of the 2024 Huawei Software Elite Challenge, highlighting lessons learned and performance outcomes.

Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
Huawei Cloud Developer Alliance
How We Engineered Robust AI Strategies for Huawei’s Software Elite Challenge

Motivation

Participating in the 2024 Huawei Software Elite Challenge was driven by a desire to find an engaging project that could reignite the joy of coding, as routine research had become monotonous and feedback slow.

Preliminary Stage Approach

The map featured only open ground, sea, obstacles, and ports, eliminating the need for ship path planning. The design was divided into four modules: (a) robot path planning, (b) robot collision‑avoidance, (c) robot cargo strategy, and (d) ship cargo strategy.

Robot Path Planning

We employed a simple breadth‑first search (BFS). Functions dis(x,y,tx,ty) and direct(x,y,tx,ty) compute distance and next direction. Start points must be valid (open ground or port) and targets are ports or cargo generation points. BFS is executed only after selecting a cargo.

Robot Collision‑Avoidance

Each robot generates a future path of length detect_time assuming no collisions. By comparing these future paths, we identify groups of robots that may collide. For each group, we generate a legal path of length handle_time for every robot, sample multiple alternatives, evaluate them with a penalty‑heavy collision cost and weighted distance metric, and select the lowest‑scoring set for execution.

Robot Cargo Strategy

Cargoes are assigned to the nearest port and sorted by value divided by send_time (distance from generation point to port). Idle robots pick the highest‑priority cargo at their assigned port. Each robot stores plan_to_work_time indicating how long it remains attached to its current port before re‑selection. Port throughput is defined as total cargo value divided by current time; we enumerate ports and robot‑port assignment times to maximize throughput differences.

Ship Cargo Strategy

Ship throughput is total cargo value divided by total travel time (from virtual start point back to it). Ships store plan_to_load_time and, upon reaching it, choose either to return to the virtual point or move to another port, selecting the option that maximizes throughput.

The preliminary stage yielded a 23rd place in practice matches and 15th in the official round.

Semi‑Final Stage Enhancements

We added ship path planning (also using BFS via sea_dis and sea_direct) and introduced new map features such as main roads and channels. Adjustments included (a) ship path planning, (b) ship collision‑avoidance, (c) revised ship cargo strategy, and (d) a purchase strategy.

Ship Path Planning

Similar to robots, BFS computes sea distance and direction, focusing on routes between ports and delivery points.

Ship Collision‑Avoidance

The mechanism mirrors the robot approach, with modifications to future path generation, legal path creation, and evaluation.

Ship Cargo Strategy

We plan multi‑port trips (e.g., A → B → C → delivery) where each port’s plan_to_load_time is considered. Sampling selects the trip with the highest ship throughput.

Purchase Strategy

Maximum purchase limits are set for robots and ships; initially one ship is bought, and additional ships are purchased only after robots reach their maximum count. Purchase locations are chosen based on the fewest prior purchases to distribute robots evenly.

The semi‑final round placed us within the top ten, though luck still played a role.

Final Round – Game‑Theoretic Thinking

All teams competed on a single map, creating a competitive environment with limited resources. Key observations:

Resource competition makes pure cost‑performance strategies less reliable because future actions are uncontrollable.

Early cash flow provides a multiplicative advantage throughout the match.

Port monopolization leads to a zero‑sum game, prompting early blocking strategies.

Strategy Design

We overhauled nearly every tactic:

Robot‑Ship Coordination: Robots prioritize delivering cargo to their own ships, even if it means longer routes, to fill ships quickly for early cash conversion.

Robot Cargo Selection: (a) Prioritize high‑value cargo, dispatching the nearest robot; (b) When none are available, robots patrol preset points and collect lower‑value cargo. Port selection is refreshed each frame, favoring marked own ships or ports with high loaded cargo.

Ship Port Selection: Prefer empty ports nearest to the ship; if none, wait at own occupied ports or target ports with many loaded ships.

Ship Departure: The first ship’s dwell time is limited and departs once sufficient value is loaded; later ships leave only when full, with a blocking timeout to prevent indefinite occupation.

Purchase Ratio: Maintain a 6:1 robot‑to‑ship purchase ratio, halting purchases when robot count exceeds 1000 to avoid boundary effects.

Despite extensive analysis, many teams did not implement these game‑theoretic tactics, allowing our cost‑performance approach to dominate and secure the top three positions.

Conclusion

Prior experience with the challenge helped us focus on stable, robust strategies rather than map‑specific optimizations. The preliminary and semi‑final stages each required about a week of implementation, and the generic approach proved effective across rounds. Lessons learned include the importance of modular, switchable strategy components and thorough version control.

AIRoboticsGame Theorycollision avoidancepath planning
Huawei Cloud Developer Alliance
Written by

Huawei Cloud Developer Alliance

The Huawei Cloud Developer Alliance creates a tech sharing platform for developers and partners, gathering Huawei Cloud product knowledge, event updates, expert talks, and more. Together we continuously innovate to build the cloud foundation of an intelligent world.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.