<!-- wp:paragraph -->
<p>Admit it, the moment you saw Jarvis in Iron Man, you knew you wanted one, or maybe it was Hal 2000 before that, or even Samantha.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>There’s something undeniably cool about an AI companion or secretary that you can interact with. Think about it. Would Star Wars be the same without R2D2 and BB8, or Iron Man without Jarvis?</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":2124} -->
<div class="wp-block-image"><figure class="aligncenter"><img src="https://www.gadgetgyani.com/wp-content/uploads/2016/12/zucker-man-164680.jpg" alt="facebook jarvis" class="wp-image-2124"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>If you’re like Mark Zuckerberg, however, you’ve gone out of your way to bring these fantasies to life. Meet Jarvis, a Zuckerberg-designed AI that Zuckerberg and his family can use to control his house.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Built from scratch using the tools that <strong><a href="http://newsroom.fb.com/news/2016/11/accelerating-innovation-and-powering-new-experiences-with-ai/" rel="nofollow">Facebook gives developers and engineers</a></strong> on its platform, Jarvis is the perfect example of what can be achieved with modern computing power.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><iframe style="border: none; overflow: hidden;" src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fzuck%2Fvideos%2F10103351034741311%2F&amp;show_text=0&amp;width=560" width="560" height="315" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The idea of Jarvis was born when Zuckerberg decided to spend a year learning about AI. The Facebook CEO’s fascination with Iron Man naturally led him to the idea of Jarvis, and that’s exactly what he set about building.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To start with, Zuckerberg says that he needed to take stock of his home and figure out what he wanted to do. Most of his house is wired up via a <strong><a href="https://www.crestron.com/" rel="nofollow">Crestron system</a></strong> (a universal remote for your home), and he also had a multitude of appliances, including a toaster and a T-Shirt cannon — we kid you not — that he wanted his AI to control.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Baby steps</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The first step was getting everything to talk to a central server, called the Jarvis server. As Zuckerberg discovered, this was much harder than he expected. Most of his home’s smart devices were using proprietary APIs (Application Program Interface) that made it almost impossible for devices to talk to each other, let alone a central server.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":353972,"linkDestination":"custom"} -->
<figure class="wp-block-image"><a href="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-overview-Facebook-720.png"><img src="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-overview-Facebook-720.png" alt="Image: Facebook" class="wp-image-353972"/></a></figure>
<!-- /wp:image -->

<!-- wp:html -->
<div class="prodtxtinf">Image: Facebook</div>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>Another issue was that not all devices were ‘smart’ and the only way he could connect them was via smart switches and the like (think: toasters).</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To solve this problem, Zuckerberg had to reverse-engineer APIs and modify the hardware of components that couldn’t be connected to his server.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Among the challenges, the highlights include the fact that for safety reasons, a toaster won’t start toasting bread that had been previously inserted. Zuckerberg had to get a toaster from the 1950s that did what he wanted and then design a mechanism to get it to toast bread via a digital signal.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Once done, his next priority was to build a glorified remote control. The Jarvis server needed to be able to communicate with and control all of this equipment, after all.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Listen, learn, and obey</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>That was the hard part. Natural language processing came next, and Zuckerberg claims that he was quite surprised at how easy it was. There were challenges of course, but he says that the tools that Facebook has its disposal, the ones it gives its engineers and developers, are very robust and capable. In particular, he’s all praise for Messenger’s Bot API.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":353973,"linkDestination":"custom"} -->
<figure class="wp-block-image"><a href="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-code-bash-Zuckerberg-720.png"><img src="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-code-bash-Zuckerberg-720.png" alt="Natural language processing on Jarvis. Image: Facebook" class="wp-image-353973"/></a></figure>
<!-- /wp:image -->

<!-- wp:html -->
<div class="prodtxtinf">Natural language processing on Jarvis. Image: Facebook</div>
<!-- /wp:html -->

<!-- wp:paragraph -->
<p>He started with text commands via the Facebook Messenger because these were easier for Jarvis to understand. The idea behind using Messenger was simple. Zuckerberg wanted a means of controlling his home from wherever he was, even from outside.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>He explains that the initial programming was easy. Teaching Jarvis to understand simple words like “bedroom” and “Lights” was easy, but he ran into problems when he realized that his wife refers to a room as the “family room” and he calls it the “living room.”</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Rather than hard-code these words into the system, Zuckerberg decided to use a&nbsp;deep-learning algorithm that can learn and adapt to these nuances.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This problem came to the fore when he started work on the music system in his house. At home, his music needs are satisfied by a <strong><a href="http://www.sonos.com/en-us/home" rel="nofollow">Sonos</a></strong> system and Spotify. In Zuckerberg’s words, asking Jarvis to “play someone like Adele” is very different from asking it to “play some Adele.”<br />
Taking things a step further, Jarvis needed to understand the classification of songs, know preferences and adapt to listening patterns.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This took a lot of tweaking, but Facebook already has some tools for coding AI and speech recognition, including a complete, open-source archive on GitHub <strong><a href="https://github.com/facebookresearch" rel="nofollow">here</a></strong>.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Voice recognition was the next step and a relatively easy one to implement. The Messenger API already allows audio to be transmitted and Jarvis only transcribed this. Zuckerberg even built a custom app for iOS that would always listen to him and accept voice commands.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Face recognition and image processing were the obvious next step.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>He set up multiple cameras around his house and at the front door. If someone presses the bell, the system will use Facebook’s facial recognition algorithms to determine who the person is and tell Zuckerberg as much. Zuckerberg can then ask Jarvis to unlock the door or perform a similar such action.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><strong>Putting the ‘intelligence’ in AI</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>All of these steps were taken to help Jarvis understand context. Once Priscilla, Zuckerberg’s wife, joined in on the fun, Jarvis had to learn to differentiate between the two.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Asking Jarvis to turn up the AC in “my office” could mean either Priscilla’s office or Zuckerberg’s office, for example. Jarvis also needed to learn whose music to play when asked to do so.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"align":"center","id":353974,"linkDestination":"custom"} -->
<div class="wp-block-image"><figure class="aligncenter"><a href="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-640.jpg"><img src="http://tech.firstpost.com/wp-content/uploads/2016/12/Jarvis-640.jpg" alt="Jarvis 640" class="wp-image-353974"/></a></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>A simple command like “turn on the lights” would require Jarvis to know who gave that command and where that person was and then to turn on the appropriate lights.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><iframe style="border: none; overflow: hidden;" src="https://www.facebook.com/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fzuck%2Fvideos%2F10103351403412491%2F&amp;show_text=0&amp;width=560" width="560" height="315" frameborder="0" scrolling="no" allowfullscreen="allowfullscreen"></iframe></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Zuckerberg succeeded in doing all of this by his lonesome. In fact, he’s so happy with his progress that he claims that such “open-ended” requests are his favorite commands these days.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Isn’t it far more convenient to say, “turn on the lights” and have them just turn on, rather than say, “turn on the lights in Mark Zuckerberg’s bedroom”?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Facebook’s work on <a href="http://tech.firstpost.com/news-analysis/heres-how-ai-is-empowering-facebook-to-create-a-better-world-346399.html"><strong>voice recognition and image processing</strong> </a>have helped immensely on this front.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In a blog post where he explains his work in more detail, Zuckerberg is all praise for Facebook’s tools and the work his engineers have put in to make these tools more accessible to the average developer.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Call it what you will, a plug for Facebook or shameless product placement, the fact remains that Zuckerberg did all of this coding himself with tools that are available to you and me. It’s incredible work.</p>
<!-- /wp:paragraph -->