The basic principle of robotics and AI

Image
Artificial intelligence applied to robotics development requires a different set of skills from you, the robot designer or developer. You may have made robots before. You probably have a quadcopter or a 3D printer. The familiar world of  Proportional Integral Derivative  ( PID ) controllers, sensor loops, and state machines must give way to artificial neural networks, expert systems, genetic algorithms, and searching path planners. We want a robot that does not just react to its environment as a reflex action, but has goals and intent—and can learn and adapt to the environment. We want to solve problems that would be intractable or impossible otherwise. Robotics or a robotics approach to AI—that is, is the focused learning about robotics or learning about AI? about how to apply AI tools to robotics problems, and thus is primarily an AI using robotics as an example. The tools and techniques learned will have applicability even if you don’t do robotics, but just apply AI to

Dissecting an iOS App

You find out about the typical components of an app and how they interact as it runs. Figure 6-1 shows these components. As you can see from this figure, the components of an app can be grouped into model, view, and controller components.

The model components are the Objective-C classes that implement the domain logic of the application as well as manage long-lived state. Some of these classes might also be persistent; that is, they may save their state across runs of the app on the file system or in a database.

The view classes represent the user interface of the app. They handle showing information to the user. These classes also handle interactions with the user; that is, they handle touches on the screen, keyboard input, and so on.


The controller classes are responsible for managing the execution of the app. Once the app is running, these controller classes also are the bridge between the views with the model. These classes consist of the Application Delegate, the root view controller, and app-specific view controllers.

The preceding model, view, and controller classes don’t simply materialize out of thin air when an app starts. App execution begins with the main function that is then responsible for instantiating all the other classes. Learn more at iOS App Development Course

The following code for the main program of the Tic-Tac-Toe application shows you how app execution begins (see file main.m in the folder Supporting Files):

... #import "TTTAppDelegate.h" int main(int argc, char * argv[]){    @autoreleasepool {        return UIApplicationMain(argc, argv, nil,                                  NSStringFromClass([TTTAppDelegate class]));    } }
Running this main function causes the following:
 1. A (singleton) instance of the class UIApplication is created.


 2. The UIApplication object, in turn, creates an instance of the app-specific application delegate (that is, a subclass of UIApplicationDelegate) and, in a separate thread, calls its initialize method.

3. The UIApplication object executes an event loop, where it listens for two kinds of events: 
  • User-interface  (UI) events, such as touches on a screen. The UI events are sent to the window object.
   • System events, such as for a low battery or when the app will be sent to the background because the device receives a phone call.  System events are sent to the application delegate by the UIApplication object.

4. The application delegate creates the window for the app (an instance of the class UIWindow), along with a Root view controller that manages the window.  The application delegate also creates a manager for the app’s model. This manager manages the Core Data objects for the app. (Turn to Chapter 7 for information about Core Data.) swift course

 5. The Root view controller creates additional view controllers as specified in the storyboard of the app. The creation of the view controllers results in the creation of their views. These views become part of a view hierarchy — an inverted tree of views and subviews.

When the app commences and is in a steady-state, only the event loop runs. This event loop listens for events and calls your code appropriately to respond to them. Once the app starts, it’s completely event-driven and does computation only when iOS or a user asks it to do so.

If you want to Get more Additional Information from iOS Development course online 

Comments

  1. Terrific post thoroughly enjoyed reading the blog and more over found to be the tremendous one. In fact, educating the participants with it's amazing content. Hope you share the similar content consecutively.

    Data Analytics Course in Raipur

    ReplyDelete

Post a Comment

Popular posts from this blog

iOS 13 Features

Data Science and Machine Learning

Data Scientist Interview Question