A multilayer neural network architecture is proposed as a trainable controller for realizing time-optimal switching surfaces. The locomotion mechanism of a mobile robot is modeled by a double integrator dynamic system with linear acceleration as the control input to the actuators. A four-layer feedforward neural network is then trained, using a collection of representative samples chosen from a certain region of the state space, to realize a continuous mapping between the system's states and optimal control actions. This network is then used as part of a specified control loop. Simulation of the overall system generated nearly optimal state trajectories.