ADM Advanced Programming Challenge

Build a Workcell Digital Twin Simulator

Use Python and AI-assisted development to create a simplified digital twin of a robotic workcell. Your simulator should model movement, magnet state, parts, errors, and production status without using the physical robot.

Recommended Time

5–8 class periods

Work independently through the milestones while other students complete Python remediation.

Core Language

Python

The required simulator logic should be written in Python. A graphical interface is an optional extension.

Final Product

Working digital twin

Your program should accept simulated Workcell commands, update system state, detect errors, and report what the system is doing.

Challenge Brief

The Problem

Engineers often test automation software in a digital environment before connecting it to physical equipment. Your task is to create a simplified digital twin of a VEX-style robotic workcell.

Your simulator does not need exact robot physics. It must accurately represent the logic and state of the system: where the arm is, whether the magnet is on, whether a part is being carried, whether a requested move is valid, and what has happened during the production run.

AI / Vibe-Coding Rules

How You May Use AI

Allowed

Use AI aggressively

  • Ask AI to generate starter code, classes, functions, test cases, or interface ideas.
  • Paste errors into AI and ask for debugging help.
  • Ask AI to refactor repetitive code.
  • Ask AI to explain unfamiliar code line-by-line.
  • Ask AI to suggest new features or improvements.
  • Use AI to help create documentation and a README after you understand the program.
Your Responsibility

You still own the result

  • You must be able to explain how your simulator works.
  • You must test AI-generated code instead of assuming it is correct.
  • You must fix or revise code that does not meet the challenge requirements.
  • You must keep a short AI development log showing important prompts, changes, and decisions.
  • You must be able to make a small requested change during the final check without starting over.
Required Features

Minimum Viable Simulator

Complete all six before adding extensions.

1. Robot State

Track current x, y, and z coordinates and begin at a defined home position.

2. Movement Commands

Create methods or functions that behave like:

arm.move_to(x, y, z)
arm.move_inc(dx, dy, dz)

Each valid move should update and report the new simulated position.

3. Magnet State

Track whether the simulated end-effector magnet is ON or OFF using VEX-style commands.

4. Workspace Limits

Define legal X, Y, and Z ranges. Invalid movement requests must be rejected without changing the stored position.

5. Part Handling

Create at least three simulated parts. Allow pickup only at an appropriate location and track whether the arm is carrying a part.

6. Production Log

Record movements, pickups, placements, errors, and production totals. Print a clear summary at the end.

Milestones

Build in Stages

Checkpoint 1

Robot State + Movement

  • Store X/Y/Z.
  • Implement move_to().
  • Implement move_inc().
  • Demonstrate at least five movement commands.
Checkpoint 2

Validation + Errors

  • Add workspace boundaries.
  • Reject invalid coordinates.
  • Prove rejected commands do not change system state.
Checkpoint 3

Magnet + Parts

  • Track magnet state.
  • Create at least three parts.
  • Allow valid pickup and placement.
  • Track the carried part.
Checkpoint 4

Production Run

  • Move at least three parts.
  • Include at least one intentionally invalid command.
  • Print a final production summary and event log.
Required Testing

Prove It Works

  1. Move to a valid absolute coordinate and report the new position.
  2. Use a relative movement and report the result.
  3. Attempt a move outside the workspace and show the error response.
  4. Turn the magnet on when no part is available.
  5. Successfully acquire a part at a valid location.
  6. Move while carrying the part.
  7. Place the part at a valid destination.
  8. Attempt one logically invalid action and show how the simulator handles it.
  9. Complete a three-part production run.
  10. Print a final summary showing moves, parts transferred, and errors encountered.
Advanced Extensions

Choose Your Upgrade

After the core simulator works, add one or more.

A

Cycle-Time Simulation

Estimate movement time based on distance and compare production strategies.

B

Restricted Zones

Create areas the simulated arm may not enter and detect violations.

C

State Machine

Add states such as IDLE, MOVING, PICKING, PLACING, COMPLETE, and ERROR.

D

2D Visualization

Create a graphical top-down workspace showing parts, destinations, and the end-effector location.

E

Path History

Store every position visited and display or plot the movement path.

F

3D Digital Twin

Create a simplified 3D visualization. Exact VEX geometry is not required.

Deliverables

What You Submit

  1. Final simulator code.
  2. Test evidence showing the required test cases.
  3. AI Development Log with at least five meaningful prompts or AI interactions, what the AI suggested, and what you accepted, rejected, or changed.
  4. Bug log documenting at least three problems and how they were fixed.
  5. README / user guide explaining how to run and use the simulator.
  6. Short reflection explaining one place where AI helped significantly and one place where the AI-generated solution was incomplete, incorrect, or needed improvement.
Final Check

Explain + Modify

You will complete a short teacher check before the project is considered finished. You should be able to:

  • Explain the purpose of the major sections of your program.
  • Identify where the simulator stores its current state.
  • Explain how invalid commands are detected.
  • Describe how a part is picked up and released.
  • Make one small change requested by the teacher, such as changing a workspace limit, adding a part, or changing a destination coordinate.

You do not need to memorize every line of code. You do need to understand the system you built.

Assessment

50-Point Rubric

CategoryPointsEvidence
Core Simulator Functionality15Movement, state, magnet, parts, and production logging work as required.
Testing & Error Handling10Required tests are demonstrated and invalid actions are handled cleanly.
Iteration & AI-Assisted Development10AI log shows useful prompting, evaluation of AI output, revision, and debugging rather than simple copy/paste.
Understanding & Final Modification10Student can explain the major system logic and successfully make a small requested change.
Documentation5README, bug log, test evidence, and reflection clearly document the project.