Robot Soccer 2.0: Modeling Team Strategies with Stateflow and Network Effects with SimEvents

Additional discrete modeling enhancements to the demo
1.2K Downloads
Updated 1 Sep 2016

View License

This demo is an extension of the following demo:
http://www.mathworks.com/matlabcentral/fileexchange/28196-robot-soccer-an-exercise-in-learning-the-key-features-of-simulink

The key Simulink concepts on how to build this demo discussed in the "Introduction to Simulink" webinar:

Please note that the webinar does not cover the Stateflow and SimEvents portions.

Key points to consider in this demo:

1. Team 1 has a strategy that is implemented as different modes in a state chart where the collective behavior of the two robots switches between aggressive and passive plays. The criteria that determines the switching is based on opponent positions and residual energy. Team 2 uses a rather simple strategy with one robot always attacking and the other simply defending by blocking shots.

2. For each team, both robots upload their energy values on a shared channel and download actuator command signals on another shared channel from a centralized station.

3. Observe that the outcomes and game play are different each time you run the simulation. How can you explain this paradox given that all the initial positions and strategy of the robots are the same? What is causing the non-deterministic system level behavior in the system?

4. Under the non-deterministic circumstances outlined above, is it possible to design (assuming existence) an algorithm that guarantees a 90% confidence that team 1 will always win? If such an algorithm does not exist, can you prove why?

Please make sure you use R2011b as SimEvents underwent a major update that requires new blocks (gateway block) for this demo to work.

Cite As

Simulink Dude (2024). Robot Soccer 2.0: Modeling Team Strategies with Stateflow and Network Effects with SimEvents (https://www.mathworks.com/matlabcentral/fileexchange/32835-robot-soccer-2-0-modeling-team-strategies-with-stateflow-and-network-effects-with-simevents), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.3.0.1

Updated license

1.3.0.0

Introduced spacing in the description to make it readable.

1.2.0.0

Turned on the zeroc crossings in the model to make more accurate collisions.

1.0.0.0