Difference between pages "Wraith" and "Scalar2/Design Philosophy"

From Robowiki
(Difference between pages)
Jump to navigation Jump to search
m (GitWikiBot moved page Wraith.mw to Wraith without leaving a redirect: wrong original file name)
 
(Restored edits authored by Xor dated 2019-08-12T15:49:05+00:00)
 
Line 1: Line 1:
{{Navbox small
+
[[:Category:Scalar Series|Scalar Series]] is a practice of iterative development, with [[ScalarBot]] being the "zero", [[ScalarN]], [[ScalarR]] being the "one", and now [[Scalar2]] is the "two".
| title = Wraith Sub-pages
 
| parent = Wraith
 
| page1 = Version History
 
| page2 = Challenge Results
 
| page3 = Wolfman's TODO List
 
}}
 
  
Wraith is a refactor of my bot [[AgentSmithRedux]].  
+
The architecture of Scalar series has long been a secret, but with Scalar2, the design has finally reached a stable state.
  
{{Infobox Robot
+
Most bots follow hand-crafted Movement/Gun/Radar horizontal slices, but a component system is more suitable for "super-mega bots". And here is the evolvement of the component system of Scalar Series:
| author          = [[User:Wolfman|Wolfman]]
 
| extends        = [[AdvancedRobot]]
 
| targeting      = Virtual Guns with Linear, Circular and Head On Targeting
 
| movement        = [[DangerPrediction]]
 
| current_version = 0.1
 
| download_link  = https://drive.google.com/uc?export=download&id=1MlGa-docshYLFIc2udl5qOyXdT4xL6KF
 
| isOpenSource    = no
 
| isOneOnOne      = yes
 
| isMelee        = not yet but planned
 
}}
 
  
== Background Information ==
+
1. ScalarBot's component system is fairly simple, each component simplify has the raw events from robocode forwarded, like most robots' component system do.
  
Returning after 3 years, I wanted to have a bit of fun and restart some robocode projects. Taking [[AgentSmithRedux]] and improving upon it for fun.
+
2. ScalarN and ScalarR has a reflection based event dispatcher that decouples event firer and event listener, and some 'read-only' services provide information shared between Movement/Gun/Radar. This is essentially vertical slicing before Movement/Gun/Radar horizontal slicing. However, the horizontal slicing part is listening to raw events from robocode directly, as 'read-only' services do, which complicates the information sharing.
  
It is currently in very early testing and is not expected to be competitive till it has all its intended features & iteration.
+
Like mentioned in [[User talk:Rednaxela/BotBase]], the architecture of the "one" generation of Scalar series is already component based, service-oriented and event-driven, and ScalarR also features some data-centric approach. However, the flexibility provided by the component system also makes data logging and component simulating hard, as the dependency of each component is relatively unclear.  
  
== Strategy ==
+
Then, with the experiment of [[ScalarG]], a gun experiment platform that features multiple level of data logging and simulating, the successful component of ScalarN, ScalarR and ScalarG has been finally made into Scalar2.
  
;How does it [[:Category:Movement|move]]?
+
Instead of being entirely built upon event based component system, Scalar2 has two vertical layer of components. The first level is event-driven, handing raw events from robocode and features full flexibility with highly decoupled information sharing. The second level is more like microservices, with self-contained functionality and clearly defined interfaces that each defines all input and output of a service, no more obscure dependencies at this level. Since the complexity of raw events are already consumed at the first level, anything needed in the second level is nothing more than some structs with no hidden states, even the need for 'read-only' services is eliminated. With this approach, each component at the second level is perfectly simulatable, making the use of machine learning methods such as genetic algorithms easy and feasible.
  
An evolution of the technique I've currently called [[DangerPrediction]] from [[AgentSmith]] which is a form of minimum risk movement whereby it plans its route ahead based on incoming predicted bullet positions from the enemies. It should theoretically work exactly the same in 1v1 and melee as the only difference is more incoming bullets in melee to avoid. Still plan to do a write up of [[DangerPrediction]] once its been nailed down and is competitive in 1v1.
+
An example of microservices design of ScalarG/Scalar2 is Motion Representer service. It encapsulates the logic of representing the motion of a robot between a wave is fired and the wave hits it. Implementations of this service can be [[Guess Factor]] motion representer, [[Play It Forward]] motion representer, [[Displacement Vector]] motion representer etc. The difference between those motion representing methods are hidden under the interface, and the input of the service is also clearly defined, making the use of motion representer in simulated environment trivial.
 
 
At the time of writing it will dodge HOT & linear guns at around 99+% efficiency, but does not yet take into account more advanced techniques that could be fired at it.
 
 
 
;How does it [[:Category:Targeting|fire]]?
 
 
 
Its currently just got a simple Virtual Gun array at the moment choosing the best gun between various guns including Linear, Circular and Head On.
 
 
 
;How does it [[Dodging Bullets|dodge bullets]]?
 
 
 
See Movement above!
 
 
 
== Additional Information ==
 
 
 
;Where did you get the name?
 
 
 
Wraiths can only be hit by magical weapons! ;)
 
 
 
== Credits ==
 
 
 
Currently contains the source code for Raiko Micro's gun, but it is disabled as it was required for MC2K7 challenge testing.
 
 
 
== Thanks To ==
 
 
 
Everyone who contributes to the RoboWiki. It's an awesome resource, be proud of yourselves!
 
 
 
[[Category:1-vs-1_Bots|Wraith]]
 

Latest revision as of 01:28, 25 April 2020

Scalar Series is a practice of iterative development, with ScalarBot being the "zero", ScalarN, ScalarR being the "one", and now Scalar2 is the "two".

The architecture of Scalar series has long been a secret, but with Scalar2, the design has finally reached a stable state.

Most bots follow hand-crafted Movement/Gun/Radar horizontal slices, but a component system is more suitable for "super-mega bots". And here is the evolvement of the component system of Scalar Series:

1. ScalarBot's component system is fairly simple, each component simplify has the raw events from robocode forwarded, like most robots' component system do.

2. ScalarN and ScalarR has a reflection based event dispatcher that decouples event firer and event listener, and some 'read-only' services provide information shared between Movement/Gun/Radar. This is essentially vertical slicing before Movement/Gun/Radar horizontal slicing. However, the horizontal slicing part is listening to raw events from robocode directly, as 'read-only' services do, which complicates the information sharing.

Like mentioned in User talk:Rednaxela/BotBase, the architecture of the "one" generation of Scalar series is already component based, service-oriented and event-driven, and ScalarR also features some data-centric approach. However, the flexibility provided by the component system also makes data logging and component simulating hard, as the dependency of each component is relatively unclear.

Then, with the experiment of ScalarG, a gun experiment platform that features multiple level of data logging and simulating, the successful component of ScalarN, ScalarR and ScalarG has been finally made into Scalar2.

Instead of being entirely built upon event based component system, Scalar2 has two vertical layer of components. The first level is event-driven, handing raw events from robocode and features full flexibility with highly decoupled information sharing. The second level is more like microservices, with self-contained functionality and clearly defined interfaces that each defines all input and output of a service, no more obscure dependencies at this level. Since the complexity of raw events are already consumed at the first level, anything needed in the second level is nothing more than some structs with no hidden states, even the need for 'read-only' services is eliminated. With this approach, each component at the second level is perfectly simulatable, making the use of machine learning methods such as genetic algorithms easy and feasible.

An example of microservices design of ScalarG/Scalar2 is Motion Representer service. It encapsulates the logic of representing the motion of a robot between a wave is fired and the wave hits it. Implementations of this service can be Guess Factor motion representer, Play It Forward motion representer, Displacement Vector motion representer etc. The difference between those motion representing methods are hidden under the interface, and the input of the service is also clearly defined, making the use of motion representer in simulated environment trivial.