← Coinbase Interview Insights

Coinbase·Software Engineer·Online Assessment (OA)·Intermediate

Intermediate
Jun 2026

Summary

Coinbase sent me an OA-style problem that was way more interesting than the usual leetcode grind. You're basically building a Flappy Bird agent that has to decide frame-by-frame whether to jump, which sounds fun until you're staring at physics constants and pipe gap windows trying to not overthink it.

Questions Asked (1)

Q1

Implement a Flappy Bird agent class with a method that decides each frame whether the bird should jump, using forward simulation and safety margins to avoid pipes and screen boundaries.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

My first instinct was to just hardcode some threshold on the bird's y-position relative to the pipe gap center, which technically works but falls apart on edge cases near the floor.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the game state representation and constraints, then outline a forward simulation approach that predicts the bird's trajectory and pipe positions. Emphasize safety margins and a decision rule that balances survival with progress, and discuss trade-offs between simulation depth and computational cost.

Pro tip: Mention that you would simulate multiple candidate actions (jump vs. no jump) and choose the one that maximizes a safety score, but also include a fallback heuristic for edge cases like screen boundaries. This shows you think about robustness and real-time performance.

1. Clarify inputs and outputs

Define the agent's interface: what information is available each frame (bird position, velocity, pipe positions, screen dimensions) and what the method should return (a boolean jump decision).

2. Design forward simulation

Describe how to simulate the bird's future positions over a short horizon (e.g., next few frames) under both jump and no-jump actions, using simple physics (gravity, jump impulse).

3. Define safety margins and scoring

Establish safety margins for pipe gaps and screen boundaries, and create a scoring function that penalizes proximity to obstacles and rewards staying centered in the gap.

4. Implement decision logic

Compare simulated outcomes for jump vs. no-jump, choose the action with the higher safety score, and include a tie-breaker or fallback heuristic (e.g., jump if below a threshold).

5. Discuss trade-offs and optimizations

Address computational cost of simulation, potential for precomputation or caching, and how to tune parameters like simulation horizon and safety margins for different difficulty levels.

Key Points to Mention

  • State representation: bird position, velocity, pipe positions, screen boundaries.
  • Forward simulation: predict future states under jump and no-jump actions.
  • Safety margins: buffer zones around pipes and screen edges to avoid collisions.
  • Scoring function: balance survival (avoiding obstacles) with progress (moving forward).
  • Computational efficiency: limit simulation depth, use simple physics, consider real-time constraints.
  • Edge cases: handling screen boundaries, pipe gaps of varying sizes, and unexpected states.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.