Pages

July 28, 2015

ripple effect design

As Android L material design has became a new UI inspiration, tried the same ripple effect of Android L in HTML5 and CSS3 using simple animations. So lets get started,

First, Create a button markup and bind a click event listener using jquery.
  1. <button class="ripple">AskorB</button>
Now, on clicking, we declare a ‘$div’ variable, and gets its offset. Then, we calculate the position of cursor by event.pageX and event.pageY from button position.
  1. $('.ripple').on('click', function (event) {
  2. event.preventDefault();
  3. var $div = $('<div/>'),
  4. btnOffset = $(this).offset(), //get position of div
  5. //get cursor position
  6. xPos = event.pageX - btnOffset.left,
  7. yPos = event.pageY - btnOffset.top;
  8. //add animation class
  9. $div.addClass('ripple-effect');
  10. var $ripple = $(".ripple-effect");
  11. //set the hight & width of the animation class
  12. $ripple.css("height", $(this).height());
  13. $ripple.css("width", $(this).height());
  14. $div
  15. .css({
  16. top: yPos - ($ripple.height()/2),
  17. left: xPos - ($ripple.width()/2),
  18. background: $(this).data("ripple-color")
  19. })
  20. .appendTo($(this));
  21. window.setTimeout(function(){
  22. $div.remove();
  23. }, 2000);
  24. });
Then the final part is, add CSS3 animation class for its height and width. Finish the animation is 2 seconds.
  1. @keyframes ripple-animation {
  2. from {
  3. transform: scale(1);
  4. opacity: 0.4;
  5. }
  6. to {
  7. transform: scale(100);
  8. opacity: 0;
  9. }
  10. }

Elon Musk and Steve Wozniak lead AI experts who want killer robots banned


Elon Musk and Steve Wozniak lead AI experts who want killer robots banned

Hundreds of the world’s leading robotics and artificial intelligence experts have released an open letter urging the United Nations to support a ban on lethal autonomous weapons systems.
The letter is signed by 700 researchers and more than 600 other experts including Elon Musk, famed physicist Stephen Hawking, Apple co-founder Steve Wozniack, Skype co-founder Jaan Talinn and activist philosopher Noam Chomsky.
Its release coincides with the first day of the world’s most prestigious AI conference, the 2015 International Joint Conference on Artificial Intelligence.
The letter argues that the deployment of autonomous weapons is feasible within years and will play a dangerous role in driving a third revolution in warfare, after gunpowder and nuclear arms.
Toby Walsh, a professor of artificial intelligence, says: "All technologies can be used for good and bad. Artificial intelligence is a technology that can be used to help tackle many of the pressing problems facing society today - inequality and poverty, the rising cost of health care, the impact of global warming … but it can also be used to inflict unnecessary harm."
The researchers argue that replacing human soldiers by machines is good by reducing casualties but bad because it lowers the threshold for going to battle.
The open letter:
Autonomous Weapons: An Open Letter from AI & Robotics Researchers
Autonomous weapons select and engage targets without human intervention. They might include, for example, armed quadcopters that can search for and eliminate people meeting certain pre-defined criteria, but do not include cruise missiles or remotely piloted drones for which humans make all targeting decisions. Artificial Intelligence (AI) technology has reached a point where the deployment of such systems is - practically if not legally - feasible within years, not decades, and the stakes are high: autonomous weapons have been described as the third revolution in warfare, after gunpowder and nuclear arms.
Many arguments have been made for and against autonomous weapons, for example that replacing human soldiers by machines is good by reducing casualties for the owner but bad by thereby lowering the threshold for going to battle. The key question for humanity today is whether to start a global AI arms race or to prevent it from starting. If any major military power pushes ahead with AI weapon development, a global arms race is virtually inevitable, and the endpoint of this technological trajectory is obvious: autonomous weapons will become the Kalashnikovs of tomorrow.
Unlike nuclear weapons, they require no costly or hard-to-obtain raw materials, so they will become ubiquitous and cheap for all significant military powers to mass-produce. It will only be a matter of time until they appear on the black market and in the hands of terrorists, dictators wishing to better control their populace, warlords wishing to perpetrate ethnic cleansing, etc. Autonomous weapons are ideal for tasks such as assassinations, destabilising nations, subduing populations and selectively killing a particular ethnic group.
We therefore believe that a military AI arms race would not be beneficial for humanity. There are many ways in which AI can make battlefields safer for humans, especially civilians, without creating new tools for killing people.
Just as most chemists and biologists have no interest in building chemical or biological weapons, most AI researchers have no interest in building AI weapons - and do not want others to tarnish their field by doing so, potentially creating a major public backlash against AI that curtails its future societal benefits. Indeed, chemists and biologists have broadly supported international agreements that have successfully prohibited chemical and biological weapons, just as most physicists supported the treaties banning space-based nuclear weapons and blinding laser weapons.
In summary, we believe that AI has great potential to benefit humanity in many ways, and that the goal of the field should be to do so. Starting a military AI arms race is a bad idea, and should be prevented by a ban on offensive autonomous weapons beyond meaningful human control.

July 26, 2015

MUST READ!The first thought-activated implant is an exciting hint of things to come

The first thought-activated implant is an exciting hint of things to come


GeneThought

The main achievement in optogenetics, at least so far, has been the reliable activation of neurons using light. In recent years that concept has been taken a step further with the ability to activate specific genes within those neurons using light. Researchers led by Martin Fussenegger from ETH Zürich have now implanted a living mouse with designer cells bearing genes that can be precisely controlled with light. As we will describe, that is technically challenging enough. But it is what they did next — namely, for a human wearing a brain-computer interface to remotely control the rat’s brain implant with thoughts alone — that has people talking.
The hardware pipeline they used by ETH Zurich was fairly low tech (relatively speaking, anyway). An EEG cap worn by the human picks up crude signals that reflect the general meditative state of the subject, i.e. relaxed vs less relaxed. After some signal processing, a coil almost identical to what you might find in a wireless charger is energized with a current that more-or-less varies according to that signal. The mouse, which has the implant containing the special cells which contain the special genes, sits over this coil basking in the glow of its electromagnetic field. The implant also has the receiver — basically just three orthogonal secondary coils (presumably so that some energy is intercepted regardless of the mouse’s orientation) along with a few capacitors to tune them, and a few diodes to rectify the received power so that a small DC voltage is obtained. This voltage controls a blue LED, which in turn illuminates the optogenetically enhanced cells in the implant.
brain-implants-optogenetics-switch-diagram
Image credit: The Guardian
That all may sound cool, but it’s something any kid with a soldering iron and enough smarts to construct a crystal radio set could handle. It’s the opto-enhanced part that would probably require a bit more support from a fairly sophisticated DIY genetics lab. The cells used are known as HEK cells, for human embryonic kidney cells. Kidney cells are generally not too exciting, although these particular fellows are now fairly omnipotent creatures by virtue of the handy genetic toolkits that have been developed for them. The cells have many of the same properties of immature neurons and can impersonate many more — not least of which being the adrenal cells that sit atop the kidney and dump grams of adrenalin into the blood during video games.
The list of all things that the researchers then did to these cells — the viral vectors, plasmids, and other elements engineered into them — takes up two pages in the supplementary methods so mercifully we won’t detail all of them here. [Research paper: doi:10.1038/ncomms6392]
What a mouse looks like with an optogenetics system plugged in
What a mouse looks like with an optogenetics system plugged in

One day, you’ll have a mind-controlled brain implant

The main goal the researchers had was to be able to close a physiologic loop from (in this case meditative) thought to metabolic control. Here the mouse acted as a proxy for the full loop that will one day reside in a single person — or, we can only suppose, in two or more appropriately synchronized persons. The way we know that it worked was because when the subject had the right thought, the gene in the mouse that encodes an enzyme called SEAP (secreted placental alkaline phosphatase) got activated. This gene was chosen because once it is activated, it manufactures the SEAP enzyme and then secretes it into the bloodstream where the researchers then measured it. In addition, alkaline phosphate naturally or unnaturally found in the blood is commonly used to asses disease state of various organs and there are several are easy ways to detect it.
Unfortunately, things are not quite as simple as we have described so far because blue light from the LED doesn’t activate the gene directly. The researchers actually used a light-responsive bacterial protein called DGCL for that. Believe it or not, there were several other synthetic protein links that had to be made just to get from DGCL to SEAP but that is left as an exercise for those who want to dig in. It is fairly remarkable that any kind of linear response from thought to enzyme level could be preserved through such an intricate electro-molecular chain. Hopefully this kind of technology will be increasingly embraced by a new breed of electrical-genetic engineers who are comfortable in the language of both fields. That way the most sensible ways to proceed on both fronts might be insured.
Thanks to the advances here, you might one day have a mind-controlled implant in your brain; you’ll be able to think about something — perhaps you want an additional dose of adrenaline or dopamine — and the implant will then dutifully trigger the release of the desired hormones.

Brain computer interface:Jan Scheuermann feeds herself a chocolate bar, using a BCI-controlled robotic arm

New brain implant tech from Blackrock is making ‘mind over matter’ a reality

    Jan Scheuermann feeds herself a chocolate bar, using a BCI-controlled robotic arm

It is hard to underestimate the difficulty, and therefore value, of making advances like this to the field of brain-computer interfaces or BCIs. Mapping specific functions to specific places has generally proven difficult. We know, for example, that with crude TMS stimulation, the most reliable response obtained for activating an cortical motor area discovered to date is a simple adduction of the thumb (bringing it back into the plane of the palm of the hand). In fact, that is precisely what is used as the reference point to calibrate the coil’s position and power. It is no surprise then that researchers have now been able to add more subtle thumb control to the existing suite of prosthetic powers.In 2012 quadriplegic Jan Scheuermann had two electrode arrays implanted in her brain’s left motor cortex. Within a week, she could use the implant to move a prosthetic arm in all three dimensions, and move its wrist in an additional four. That was good enough for her to use it to feed herself with the arm, and good enough to make her a national celebrity. Researchers from the University of Pittsburg have now been able to finesse an additional three degrees of freedom out of an improved implant-to-arm pipeline by swapping in additional finger motions where previously Jan had only a crude pincer grip.
To be more specific, the new functions they describe are finger abduction (spreading), thumb opposition, finger and thumb pinch (which also happens to be an important gesture for communication), and something a little more esoteric we can just call “the scoop.” The video above gives some indication of the speed and accuracy that is now possible. The science of mapping signals recorded from electrodes at various locations, to functions, as it is now practiced, doesn’t actually use any special knowledge of anatomy or physiology other then the initial placement of the array. The signal processing techniques that they use, which we have described in more detail in our post about bionic eyes, have a long history and are only now reaching the point of doing something useful.













To move forward researchers will need to supplement these methods with better anatomical information about how to best distribute multiple arrays in different regions of the brain. A major concern at the moment is making these arrays safe and legal. To that point Blackrock Microsystems has just established an overseas location in Hanover, Germany where some of the legislation on thought-controlled prosthetics is not as overbearing. In the time since the video was made, Jan’s had her own electrodes removed — a procedure that can’t be fun for the brain. Other researchers are looking to make implants from biodegradable materials that disappear on their own. While these kinds of devices are nowhere near the ability to do what 100-electrode microarrays can now do, they can potentially address of the more practical issues of longevity and device failure procedures that has the FDA concerned.
Sensor3
The complete implant, with the electrode array at the bottom, and various other parts above it. Only the electrode array is actually inside the skull.
Blackrock not only manufactures the electrode arrays but also much of the peripheral equipment that is needed — electrical feedthroughs, connectors, software, and hopefully soon, wireless capability. Blackrock recently brought engineer Ming Yin from Brown University on board, and also licensed much of the technology described in his groundbreaking paper in the latest issue of Neuron. As shown above, Yin’s new design mates a Blackrock electrode array to a wireless link which is capable of transmitting data obtained at high sampling rates (20,000 samples per second per channel) up to a distance of 5 meters. The ultra-low-power, 46-gram, custom ASIC-enabled device can operate continuously for 48 hours. That’s enough for some serious coffee drinking.
With companies like Blackrock providing off-the-shelf solutions, and universities around the globe working to perfect signal processing software, we should soon get a better handle on the possibilities, and limits, of this approach to BCIs. With electrodes that can reach ever more remote recesses of the brain, the hope is there will be less guesswork and more precision in extracting intent from the mind.

Could Artificial Intelligence Lose Its Mind?

The DeepDream algorithm Google made public this month is a strange offshoot of image recognition technology based on artificial intelligence. It can turn mundane images into hallucinatory worlds, and has spawned sites where you can have photos processed with the software and even a mobile app. Beyond the pretty pictures, however, DeepDream hints at the kind of personality that artificial intelligence could develop quite by accident.
Google engineers Alexander Mordvintsev, Christopher Olah and Mike Tyka first wrote about DeepDream in June. They explained how their software recognizes and tags images, and how it is able to distinguish between, say, a pizza on a stove top and a motorcycle rider on a dirt road:
We train an artificial neural network by showing it millions of training examples and gradually adjusting the network parameters until it gives the classifications we want. The network typically consists of 10-30 stacked layers of artificial neurons. Each image is fed into the input layer, which then talks to the next layer, until eventually the "output" layer is reached. The network's "answer" comes from this final output layer.
DeepDream's engineers turned the process inside out, "showing" lots of images of, say, a screw or a banana to the neural network and getting it to generate its own images of the objects. DeepDream was trained with animal images, and even in pictures that contained no animals -- clouds, a street scene, a human face -- it "recognized" dogs, birds and deer. I ran the algorithm, and here's what it did to my Twitter avatar, a penguin-cat hybrid:
deepdreampeng

All kinds of animals emerged that weren't originally there. The artificial neural network appeared to have come down with an acute case of pareidolia -- a condition that causes sufferers to perceive nonexistent patterns in images and sounds (such as faces in clouds or a religious images in random objects). We all do this to some degree; otherwise Rorschach tests would be useless. But recent research by Norimichi Kitagawa of the NNT Communication Science Laboratory in Tokyo shows that some people may be more susceptible than others.
In extreme cases, pareidolia can be a symptom of psychosis. Although the images DeepDream produces are visually stunning, they are not the product of a "normal" consciousness by human standards. The Google researchers wrote that "neural networks could become a tool for artists -- a new way to remix visual concepts -- or perhaps even shed a little light on the roots of the creative process in general." Sure, but it's easy to imagine how such a network could, in human terms, go off its rocker.
Programmers, of course, can calibrate the network to look for specific patterns and ignore others. But at some point, networks will be more complex than those available today, and I doubt it will be possible to control for every eventuality.
We already have a sense of how unpleasant these accidents can be. In May, Yahoo!-owned photo hosting Flickr and Google Photos introduced artificial intelligence-based autotagging. The Flickr onemarked concentration camp photos "sport" and "jungle gym," and the Google one made offensive mistakes, too. Both companies subsequently fiddled with their algorithms.
It's seemingly much easier to make an artificial brain to revise "bad thinking" than to get a human being to abandon faulty ideas or prejudices. But machines can process prodigious enormous amounts of material and at speeds that are inconceivable to a human brain; and that means the machines also could develop unfortunate personality traits, convictions and ways of looking at the world faster than they could be corrected. 
At this point, those worries belong to the realm of science fiction. DeepDream only does one highly specific task. Still, it points to one of the dangers of artificial intelligence: the potential for the machine to develop a mind of its own that is in profound disagreement with its human creator. 
And then there's the danger that the artificial mind might be so much better than our own and render us obsolete. For the moment, at least, DeepDream has allayed those fears.

July 24, 2015

DOLPHINS SPOTTED RIDING WHALES!

DOLPHINS SPOTTED RIDING WHALES!


Recently, off of the coast of Hawaii, dolphins have actually been spotted RIDING WHALES! 
dolphinridingwhale
Almost as if its a game, the dolphin would basically test how long it could stay balanced on the humpback whale’s head as he went swimming along. Eventually, the dolphin would slide down the whales back, tail first, and then once again jump back up on its head for another ride.
dolphinandwhalejumpThe photograph above that sparked all of the buzz about this phenomemon was taken by Marine Biologist Lori Mazzuca in Hawaii, and started the public discussion on the facebook page The Whale and Dolphin People Project.
As scientists, “play” was the best understanding they could come up with to explain the activity!
Soon after that, even more pictures of dolphins and whales playing together started popping up all over the place. Take a look at the video below! 
Dolphins and whales have now joined in the list of other animals that have started to play together whom before we imagined were not very close. Do you remember the dog playing with the crow? Or the squirrel playing with the cat? 
Just as humans are learning to work together, and create more meaningful bonds with each other, so too are the animals learning to play and be together as the one universal family that we really are all apart of.
Thanks for reading!

A robot has just passed a classic self-awareness test for the first time

A robot has just passed a classic self-awareness test for the first time 
A researcher at Ransselaer Polytechnic Institute in the US has given three Nao robots an updated version of the classic 'wise men puzzle' self-awareness test... and one of them has managed to pass.
In the classic test, a hypothetical King calls forward the three wisest men in the country and puts either a white or a blue hat on their heads. They can all see each other's hats, but not their own, and they're not allowed to talk to each other. The King promises that at least one of them is wearing a blue hat, and that the contest is fair, meaning that none of them have access to any information that the others don't. Whoever is smart enough to work out which colour hat they're wearing using that limited information will become the King's new advisor.In this updated AI version, the robots are each given a 'pill' (which is actually a tap on the head, because, you know, robots can't swallow). Two of the pills will render the robots silent, and one is a placebo. The tester, Selmer Bringsjord, chair of Rensselaer’s cognitive science department, then asks the robots which pill they received. 
There's silence for a little while, and then one of the little bots gets up and declares "I don't know!" But at the sound of its own voice it quickly changes his mind and puts its hand up. "Sorry, I know now," it exclaims politely. "I was able to prove that I was not given the dumbing pill."


It may seem pretty simple, but for robots, this is one of the hardest tests out there. It not only requires the AI to be able to listen to and understand a question, but also to hear its own voice and recognise that it's distinct from the other robots. And then it needs to link that realisation back to the original question to come up with an answer.
But don't panic, this isn't anything close to the type of self-awareness that we have as humans, or the kind that the AI Skynet experiences in The Terminator, when it decides to blow up all humans.
Instead, the robots have been programmed to be self-conscious in a specific situation. But it's still an important step towards creating robots that understand their role in society, which will be crucial to turning them into more useful citizens. "We’re talking about a logical and a mathematical correlate to self-consciousness, and we’re saying that we’re making progress on that," Bringsjord told Jordan Pearson at Motherboard.
Right now, the main thing holding AI back from being truly self-aware is the fact that they simply can't crunch as much data as the human brain, as Hal Hodson writes forNew Scientist: "Even though cameras can capture more data about a scene than the human eye, roboticists are at a loss as to how to stitch all that information together to build a cohesive picture of the world," he says.
Still, that doesn't mean that we don't need to be careful when creating smarter AI. Because, really, if we can program a machine to have the mathematical equivalent of wants and desires, what's to stop it from deciding to do bad things?
"This is a fundamental question that I hope people are increasingly understanding about dangerous machines," said Bringsjord. "All the structures and all the processes, informationally speaking, that are associated with performing actions out of malice could be present in the robot."
Bringsjord will present his research this August at the IEEE RO-MAN conference in Japan, which is focussed on "interactions with socially embedded robots".
Oh, and in case you were wondering, the answer to the King's original 'wise men test' is that all the participants must have been given blue hats, otherwise it wouldn't have a been fair contest. Or at least, that's one of the solutions.