Tag: Infra

  • MSD0064 Notification Ranking System

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0058 Ride-Hailing Matching System

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0054 Warehouse Robot RL Pathfinding

    Design a deep reinforcement learning system for warehouse robot path planning. An e-commerce fulfillment center (Amazon Robotics, Ocado) operates hundreds of mobile robots that navigate warehouse aisles to retrieve pods, transport goods to packing stations, and return to storage locations. Each robot must plan a collision-free path to its goal while avoiding static obstacles (shelves, pillars), dynamic obstacles (other robots, humans), and deadlocks where two robots block each other in a narrow aisle. The warehouse is a structured but dynamic grid: shelf layouts change as inventory moves, traffic density varies by time of day and order volume, and a single blocked aisle can cascade into gridlock across the entire floor. A deep RL system can learn coordinated path planning policies that outperform classical A* or Dijkstra-based planners in dense, multi-agent settings, but it must be trained safely (without crashing real robots), generalize to warehouse layouts it has never seen, and handle the non-stationarity of a live fulfillment center.

    How would you design this system? Cover the RL formulation (state, action, reward design for goal-reaching vs collision-avoidance vs throughput), the candidate RL architectures (centralized training with decentralized execution vs multi-agent PPO vs graph neural network-based coordination), how you train safely in simulation and transfer to real warehouses (sim-to-real), how you handle non-stationary traffic and layout changes, and how you evaluate path quality and warehouse throughput against classical planners.

    Line-art scene: a warehouse floor with pod rows, several small robots moving through aisles toward packing stations, a human picker in a cross aisle, and two robots facing each other in a narrow aisle with a question mark between them; constraint annotations list 500 robots, a decision every 100 ms, changing layouts, and floor-wide gridlock risk

    The Problem: hundreds of robots share narrow aisles, the shelf map changes with inventory, and one pair of robots blocking each other can stall the whole floor. Design the planner that keeps every robot moving toward its goal without a single collision.

    Answer

    The design is a hybrid planner: a classical shortest-path heuristic handles the global map, a learned per-robot policy handles the local, multi-agent decision of which move to take right now, and a hard safety shield sits between the policy and the motors. The policy is trained with centralized training, decentralized execution (multi-agent PPO with one shared actor and a team-level critic) inside a randomized simulator that never touches a real robot. The three pivotal decisions are to give the policy a precomputed path heuristic as an input channel so RL never has to rediscover the floor plan, to make every learned action pass a reservation-table and deadlock check before actuation, and to roll out through shadow mode and zone canaries where the classical planner keeps executing until the learned policy has earned trust.

    (1) Hybrid Formulation: RL owns the local decision (one of five moves given a 9×9 egocentric window and neighbors’ intended next cells), while a per-map shortest-path distance field enters as an observation channel; layout changes become a heuristic recompute, not a retrain.
    (2) CTDE With MAPPO: one shared actor runs on every robot, and a centralized critic sees the whole fleet during training only; shared weights make the robot count a runtime parameter rather than an architecture choice.
    (3) Reward Shaping: potential-based progress on shortest-path distance, collision and idle penalties, and a team throughput bonus; the mix is tuned in simulation against measured throughput, never hand-tweaked on the live floor.
    (4) Safety Shield: every proposed action is checked against a reservation table and a wait-for-graph deadlock detector; the policy proposes, the shield disposes, so collision-free is a property of the shield, not a hope about the network.
    (5) Randomized Simulation and Staged Rollout: procedurally generated layouts, replayed order streams, and injected comms delay train a policy that generalizes; shadow mode, a single-zone canary, and rollback gates carry it to the floor.

    Two-row pipeline: a training row where a layout and traffic generator feeds a simulator, a MAPPO trainer, and a versioned policy registry; a serving row where fleet state becomes per-robot observations, passes through the shared policy and a safety shield to robot motion; a deploy arrow links registry to policy and a dashed arrow sends real logs back to calibrate the simulator

    Figure 1: Train in simulation, execute per robot behind a shield: the learned policy only ever proposes a move, and real fleet logs flow back to keep the simulator honest.

    Clarify Before Designing:
    (1) Fleet and Floor: how many robots on how many square meters, and is the floor a fixed grid (Ocado-style hive) or free aisles with pods (Kiva-style pods)?
    (2) Control Topology: does a central fleet server talk to every robot at a fixed tick, or must each robot decide on-board with lossy wireless; this decides whether decentralized execution is a choice or a necessity.
    (3) Humans on the Floor: is the space caged robot-only, or mixed with pickers (as with Amazon’s Proteus); mixed traffic changes the safety envelope and the observation design.
    (4) Layout Churn: how often does the map version change (daily inventory moves vs quarterly re-slotting), and is a new map available before robots see it?
    (5) Latency Budget: what is the decision tick (100 ms is typical), and how much of it can planning consume after sensing and communication?
    (6) Baseline and Success: what does the current planner achieve in trips per hour and stalls per thousand trips, and is task assignment (which robot takes which order) in scope or fixed upstream?


    Login to view more content
  • MSD0047 Robinhood Trading Fraud Detection

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0045 Theme Park Wait Prediction

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0042 Last-Mile Delivery Routing

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • MSD0027 Fake Account Bot Detection

    Design a system to detect fake accounts and bots on a social network like Facebook, Twitter/X, or Instagram. Fake accounts power spam, coordinated inauthentic behavior, follower farming, and political manipulation, and their operators evolve constantly: they buy aged accounts with real history, use LLMs to write bios and mimic human posting cadence, and route traffic through residential proxies so IP reputation says nothing.

    The system must score accounts at creation time and keep re-evaluating them as behavior develops, while holding the false-positive rate low enough that real users are not wrongly suspended, and routing the highest-risk cases to human investigators.

    How would you design this system? Cover the account-level feature signals (registration, graph, content, behavior), the detection model architecture, how you handle adversarial evolution, the human-in-the-loop review queue, and how you measure precision and recall when ground truth is scarce.

    Line-art scene: a device farm of phones behind a proxy feeds a stack of new account cards into a social network, with a real person in the same batch and a question mark asking who is fake

    The Problem: millions of new accounts a day, a farm that can forge everything cheap to forge, and one real person sitting in the same batch. Decide who to trust without suspending them.

    Answer

    Treat this as two coupled problems running at two speeds. At signup, a low-latency gradient-boosted scorer over registration, device, and infrastructure features decides whether the account starts with friction, and a continuous re-scoring layer then re-judges every live account as its graph and behavior accumulate. That second layer is where the real detections happen: a relational GNN over the follow and friend graph plus unsupervised synchrony clustering (the SynchroTrap idea of co-clustering accounts that act on the same targets in the same time buckets) catches campaigns whose individual members each look perfectly human. Scores never map directly to bans. They map to a graduated enforcement ladder (allow, challenge, limit reach, human review, disable) so the expensive mistake, suspending a real user, requires either overwhelming cluster-level evidence or an investigator.

    (1) Two-Speed Detection: a synchronous per-signup scorer under a 200 ms budget, plus a daily (and event-triggered) batch pass over every active account, since most fake accounts only reveal themselves after they start acting.
    (2) Cluster-Level Evidence: the decision unit is the account and the campaign; graph plus action-synchrony clustering finds coordinated groups without needing labels for the new tactic.
    (3) Cost-To-Forge Feature Weighting: prefer signals an operator must pay real money or real time to fake (device integrity, aged organic graph, human-only interaction telemetry) over signals a proxy or an LLM erases for free.
    (4) Graduated Enforcement: friction first (phone or CAPTCHA challenge, reach limiting), auto-disable only in the top band with corroboration, always with an appeal path that feeds labels back.
    (5) Label Machinery: reviewer verdicts, appeal reversals, honeypot and test-buy cohorts, and a random-audit stream, because production has no clean ground truth and the flagged sample alone teaches the model its own blind spots.

    Pipeline: signup and live accounts feed a feature store, which serves a fast GBDT scorer and a daily graph and synchrony pass; a policy engine maps scores to allow, challenge or limit, or a human review queue, whose verdicts flow to a label store and weekly retraining

    Figure 1: Two speeds, one policy: a synchronous scorer at signup, a daily graph and synchrony pass over every live account, and a ladder whose top band ends at a human, not a model.

    Clarify Before Designing:
    (1) Scale And Prevalence: how many signups per day, how many active accounts to re-score, and what does the current prevalence estimate say (a few percent of MAU)?
    (2) False-Positive Budget: how many wrongly restricted real users per day is the product willing to accept, and is auto-suspension allowed at all under the platform’s appeal and regulatory commitments?
    (3) Enforcement Surface: can we impose signup friction (phone verification, CAPTCHA), or does growth own that decision and force us to detect after the fact?
    (4) Review Capacity: how many investigator-hours per day exist, in which languages and regions, and what is the target queue latency for high-harm cases?
    (5) Threat Priority: which abuse type pays first, follower farms, spam, or coordinated political campaigns, since they differ in scale, sophistication, and tolerance for delay?
    (6) Signal Access: what device, telemetry, and payment signals are legally usable per region, and how long may we retain them?


    Login to view more content
  • MSD0020 Distributed Training System

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • DL0109 Mixture-of-Experts MoE Routing

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.

  • ML0070 A/B Test Design

    This is an IntvML Pro interview question. Upgrade to Pro to unlock the full prompt, diagrams, and solution.