I have some algorithms that are very similar in very different aspects, but they are all different.
I will try to give an example of what I mean.
Suppose I have a Robot class. This class should be the "base" of all classes. It provides the basic mechanisms that allow the robot to work in its environment. It may or may not work on its own (with this I mean that it can either be an abstract class that is useless on its own, or, if possible, have basic mechanisms for being ready to work).
All robots have hands. But some robots will have humanoid hands, others will have blades, others will have razors. I could create a RobotBase base class and then create RobotHumandHand, RobotBladeHand and RobotRazorHand. But they can also have different heads, different eyes, different legs, different hands, etc. Is there any easy way to solve this problem? I would like to say that this is a bit like LEGO, so I can just define the robot and “add” the parts that I want. Maybe through the interfaces? I don’t even know if in python (which language I will use).
Any comments / suggestions really appreciated! Thank!
source
share