how and why python is used in the model of real-world battlefield scenarios
DESCRIPTION
How and Why Python is Used in the Model of Real-World Battlefield Scenarios Eric Silverman, ALATEC Inc.TRANSCRIPT
![Page 1: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/1.jpg)
Eric Silverman
The opinions expressed here are the views of the writer and do not necessarily reflect the views and opinions of TRAC-WSMR, the US Army, or any organization or person associated with the US Government.
![Page 2: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/2.jpg)
U.S. Army: Research & Analysis
How and why Python is being used by the Military to Model Real-World Battlefield Scenarios
A Case Study on: How an open-source solution, at the user base level, was successfully implanted in a DoD organization
![Page 3: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/3.jpg)
U.S. Army: Research & Analysis
• Support the U.S. Army • Training and Doctrine Command (TRADOC)• Analysis Center (TRAC)
Mission of TRAC: Provide relevant, credible analysis for informed decisions about the Army's most important and challenging issues.
www.tradoc.army.mil
![Page 4: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/4.jpg)
Combat Model
Known Data
• Physics• Quantitative Data
Combat Model
• Analytic• Stochastic• Closed Form
End Results
• Reports & Briefing Material
![Page 5: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/5.jpg)
Scripted Behaviors
![Page 6: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/6.jpg)
Scripted Behaviors
Hostile Engages Field Forces
Hostile Evacuates to the North
Support Unit Flank Hostile’s Position
Hostile has Escaped!!!
![Page 7: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/7.jpg)
Cognitive Behaviors w/Python
![Page 8: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/8.jpg)
Cognitive Behaviors w/Python
Location of target is…
![Page 9: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/9.jpg)
Cognitive Behaviors w/Python
![Page 10: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/10.jpg)
Cognitive Behaviors w/Python
![Page 11: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/11.jpg)
Cognitive Behaviors w/Python
![Page 12: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/12.jpg)
Relevance
Much of our defense establishment is focused on Cold War doctrine and weapons.
"Twenty years after the Cold War ended, this is simply not unacceptable. It's irresponsible.”
President Obama (August 2009)
The Question: How do we not fight our last war? The Answer: Open-Source Software (Jython)
![Page 13: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/13.jpg)
Jython Implementation
• COMBATXXI is developed with Java, and has an embedded Jython API
• Jython's features allow for quick creation and implementation of dynamic behaviors
• Each entity carries its own global Jython namespace throughout the simulation
• COMBATXXI has event triggers, which starts the entities' Jython scripts
![Page 14: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/14.jpg)
__.py
DynamicBehavior
__.py
Getters
__.py
Getters
__.py
Getters
__.py
FunctionLibraries
Jython Implementation
Encapsulated Source Code
![Page 15: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/15.jpg)
Example Code Snippet01 # from the Functions Library class02 # import the [is_Line-of-Sight_Between_Locations] method03 from funcLibrary import isLOSBetweenLocations()04 # from the location wrapper class get the entity’s current location05 locOfMe = location.getMyCurrentLocation() # locOfMe is an object06 # test LOS east 5 meters at a time07 distRange = 508 while noLOS != True: # using noLOS as a Boolean, loop until it is True09 # create a temporary location offset true east, by the value in distRange11 locTemp = locOfMe.newOffsetLocation(90, distRange ):12 # test to see if the two locations have line-of-sight13 noLOS = isLOSBetweenLocations(locOfMe, locTemp)14 distRange += 5 # increase the distance by 5 meters
15 # create location object that is the longest point with line-of-sight16 locToMoveTo = locOfMe.newOffsetLocation(90, distRange-5 )
![Page 16: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/16.jpg)
Example Code Snippet16 locToMoveTo = locOfMe.newOffsetLocation(180, distRange-5 )
Note: Behavior script syntax has been altered as to not disclose FOUO information
17 # use the command wrapper class to create a move order object18 moveOrder = command.createMoveOrder()19 # add the destination location to the move order20 moveOrder.addDestination(locToMoveTo)21 # override the default rate of movement to 12 mph22 moveOrder.overrideDefaultSpeed(12)23 # use the command wrapper class the execute the move order24 command.executeOrder(moveOrder)
![Page 17: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/17.jpg)
Workforce Implementation
• Complete Documentation for users, to include examples in code snippet
• Hands-on training sessions in computer labs
• Continual support for users
![Page 18: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/18.jpg)
Take Away• Military Analyst are using Jython
to Model Current and Future Battlefield Scenarios
• In an Agent Based ModelDynamic and Reactive Behaviors
are being Developed with Jython
• Non-Programmers are Developing the Complex Behaviors with Jython
• Java-based Source Code is Encapsulatedand Control Access is Provided
with Jython Wrapper Classes
• Programmers Assist the Empowered Users withDocumentation, Training, and on going User Support
![Page 19: How and Why Python is Used in the Model of Real-World Battlefield Scenarios](https://reader033.vdocuments.us/reader033/viewer/2022061202/546c4c8fb4af9f6b2c8b4fae/html5/thumbnails/19.jpg)
Contact Information
Eric SilvermanSr. Project ManagerDefense Contractor
[email protected](w) 575-679-1457 | (m) 575-915-6002
ALATEC IncA Service Disabled Veteran Owned Small Businesswww.alatecinc.com | twitter.com/alatec_jobs