text:
How can object types be differentiated in the input of a neural network?
In a neural network when inputting nerve input to sense a 2D environment, how do you differentiate two types of objects (with similar shape and size) so the neural network can treat them differently?
Each neuron in the input layer of a neural network essentially gets 1 dimensional input (range between two values) but 2 dimensional input would be needed to send both collision and category/type information through each input layer neuron. How do you get around that?
Note: After having confusion regarding the scenario / situation I'm asking about compared to other more complex scenarios, and the long comment series that ensued, I'm realizing one challenge of this site is that it's much more complicated and diverse subject matter than code, or the various other topics of Stack Exchange where the problems can be very clearly and simply expressed. Here it's more challenging to express your question and scenario clearly to avoid confusion.
Also there's probably a higher skill gap between an AI learner / enthusiast, and an expert AI specialist, compared to other fields, so that could potentially lead to even more difficulty communicating the answer / question in ways everyone can understand without confusion. Challenging SE site to ask good questions on!

Hello, welcome to AI.SE. Please note that implementation questions are off-topic here.

@Mithrandir this is a fundamental question, if this cant be asked this site is useless to anyone interested in AI.

No, it just has a different scope than you were expecting.

@Mithrandir it's such a narrow scope that you'll never have more than 100 users here. The scope defined here is almost the same as WorldBuilding SE except only AI can be asked about.

Isn't your input different for different objects? Maybe you should give a bit more details about your input und the task you are trying to accomplish.

@BlindKungFuMaster I started off giving more details but Mith said it was off topic so I over generalized it to stress that its a fundamental question.It's just a basic feed forward neural network with 20 neurons in the input layer each connecting to a nerve, each nerve radiating from the entity being controlled.

And what is supposed to be the output of the neural network?

@Mithrandir This is an on-topic question since it's not asking about concrete implementations but how to differentiate (in the general case) two objects in a two-dimensional environment by a neural network. If this question is not on-topic, this website is completely useless and if possible I will vote for it to be closed.

@Viziionary I agree this question should be on-topic on this website, on the other hand, even though I'm currently not an expert in neural networks, I'm not sure if there's just one way of doing what you want to do, so it's possible you may require to narrow your domain so that a more concrete and thus useful answer may be provided to you ;)

@nbro I think BlindKungFuMaster has a point about needing two sets of input neurons to handle different object types - and that may indeed be the concrete way of doing it in general.

@BlindKungFuMaster to answer your earlier question, the output is motion on the x and y axis. We're talking about your generic "hello world" feed forward 2D environment, eat food, avoid obstacles neural network.

I never said that you need two sets of input neurons. The input will be different for different objects, because they are different objects. If the inputs are the same for different objects you should change what your creature perceives.

@BlindKungFuMaster I'm talking about a scenario like this where you have X number of "nerves" radiating from your entity being controlled. As it is in the example I just showed, those nerves can't fundamentally know whether they're touching a wall (which the network learns to avoid) or a "booster" for example (which we want the network to learn to be attracted to). So from what you were saying, it seemed to me to do this, we need to create a second set of nerves and a second set of input neurons, and have the second set of nerves only detect good.

In your example a single nerve cannot know whether it is touching a booster or a wall, but the full input of all nerves makes it able to derive which nerves are touching a wall and which a booster.

@BlindKungFuMaster answered my question in comments, but his answer doesn't reflect that information. If he changes his answer to contain the actual answer, I'll remove mine.
The answer to the question "How can object types be differentiated in the input of a neural network?" is:
Use different sensors (nerves) to detect different types of input.
So for example:

If you want the network to be capable of differentiating two different types of objects in a simple 2D environment, use two different sets of nerves, one to detect one object type, one to detect the other. So if you want to sense 10 points around your "organism", have 20 nerves, 10 neurons in your input layer dealing with one object type, 10 dealing with the other.
That's the most simple example, dealing with binary differences (object type 1 or object type 2), but it could be less binary, like this: Let's say there are three object types and think of each object types as 1/3 of a color value. So you have three sets of 10 nerves in total transmitting to your input layer (30 neurons) and each nerve set senses either R, G, or B. If you set up your system so that there are three "objects" to collide with, stacked on top of each other (like a single object), your neural network will be capable of handling objects differently based on their RGB color value, meaning it can now handle nearly infinite "types" of objects.

Neural networks learn. That's what they are for. For your task there are two sensible scenarios:

You have a fixed reaction for danger and a fixed reaction for food and you only have to learn how to distinguish between them. In that case you basically try to classify the situation to trigger the right fixed response and this classification would be learned by backpropagation.
You directly learn to act for a given situation. In that case you can either use a genetic algorithm or you use reinforcement learning with backpropagation.

I would recommend using a genetic algorithm, because it is significantly easier and also makes sense in this situation. You would randomly initialise your network, let it run around in the environment and remember how much food it ate and how often or how quickly it died. Then you would randomly change the weights of your network and do the same thing again. If it did better this time around you would proceed to use the new weights otherwise you go back to the old weights and try a different random change.
By selecting successful random changes it would over time learn to avoid danger and seek out food.
Edit: To my mind you have a fundamental misunderstanding how perception works. If you see a lion and a cake, do those trigger different kinds of cells on your retina? No! All nerve cells are used to detect all kinds of objects! The classification, i.e. whether you are seeing a lion or a cake happens in the neural network i.e. in the higher regions of your visual cortex, far removed from the initial nerve activation. Your lion might be yellow and your cake might be yellow, only if you analyse the high level structure of your nerve inputs can you decide what you are seeing. That is the task of a neural network. And that high level structure analysis is what a neural network learns.
What seems to confuse you is the example you linked. In that example this very sparse distance measuring is enough to differentiate between walls and boosters in your high level structure analysis, because the different points of the walls that you sample have a certain relative position that you can analyse and conclude that they constitute the wall.
In your scenario very sparse distance measuring will not help you obviously. The distance of an object doesn't tell you whether it's a lion or a cake. Distance and color would be a solution to that. Or, more realistically, you have different shapes and much tighter distance sampling, and high level analysis can work out the shape from a couple of closely measured distances.

I'm using genetic evolution for the learning, but Im having trouble understanding your answer as to how the network actually differentiates the two types of objects. Lets say instead of walls and boosters we just have circles, all the same size. Some circles are good, some are bad. They can be in different positions at any given time, they move randomly (a randomly dynamic environment).

(cont) I'm struggling to understand how you're suggesting the network would learn to differentiate the two types of objects, without, as I thought you were originally saying, having two separate sets of inputs and nerves each capable of sensing one object type or the other.

It can only learn the difference if there is a difference in the input to the nerves. If the good circles are green and the bad circles are red and color vision is part of the input, that'll be enough. If the bad circles always move in groups and the good circles are always alone and it input vision is wide enough to see this difference, that would be enough too. This really has nothing to do with having one network or two.

I was never suggesting two networks, I was talking about twice the inputs, one set connected to nerves which collide with good objects, one set which collide with bad. With what you just said "If the good circles are green and the bad circles are red and color vision is part of the input", you surely understand only values between a range of -1 to 1 can be input to each input neuron in a neural network, so how would that "color vision" (the thing Im trying to do basically) work fundamentally? How do you input that to the neural system?

What Im getting at is that each neuron essentially gets 1 dimensional input (range between two values) but 2D input would be needed to input both collision and color through each input layer neuron.

@BlindKungFuMaster This question should be migrated to chat.It seems the OP is curious!

@Viziionary: Color vision in a simulated environment can be based on RGB values of the pixels on screen, so every pixel gets three nerves. The full range of all nerves will be 2D, every single nerve will receive just one data point. If one set of nerves only touches bad objects and the other set of nerves only touches good objects, than you already have to know which objects are good and which are bad. Then most of what the NN should learn is already done.

@BlindKungFuMaster See that's what I thought you were saying (from your comment earlier). But man, what's up with your answer? Your answer is just an explanation of genetic based evolutionary development of a neural network. Your comments answer my question but your answer doesn't seem to contain any of the actual answer to the question, which was how to differentiate sensory input of different objects types (which thanks to your comments, I understand is to have different input neurons sense different types of environmental information).

I see why I'm confused by what you're trying to use as the answer now: You're referencing high level cognitive skills (recognizing the difference between a cake and a lion) which is a much more complex neural system than what I'm talking about. My question was in regards to a very low level, fundamental system. To my knowledge, simulating and developing a neural network capable of learning to know the difference between a cake and a lion in 3D space and react differently to each requires incredibly large amounts of computation. I was asking about a simple 2D fundamental scenario with circles.

@J.Todd The same principle applies whether it's a red circle and a blue circle, or a lion and a cake, just more neurons and more training data might be needed.


text:
Why are inhibitory connections often used in virtual neural networks when they don't seem to exist in real life neural networks?
Something I like about neural network AI is that we already have a blueprint for it - we know in great detail how different types of neurons work, and we don't have to invent the AI, we can just replicate what we already know works (neural networks) in a simplified way and train it.
So what's confusing me right now is why many popular neural models I've seen when studying neural networks include both inhibitory and stimulating connections. In real neural networks, from my understanding, there is no negative signal being transferred, rather the signals sent between neurons are comparable to values between 0.1 and 1. There's no mechanic for an inverse (inhibiting) signal to be sent.
For example, in this network (seen overlaying a snake being simulated), the red lines represent inhibiting connections, and the blue lines represent stimulating neurons:

Is this just an inconsequential detail of neural network design, where there's really no significant difference between a range of 0 to 1 and a range of -1 to 1? Or is there a reason that connections in our simulated neural networks benefit from being able to a express a range from -1 to 1 rather than just 0 to 1?

If by real life neural networks, you mean the squishy kind in somebodies skull, those do have inhibitory connection. If not, what is the difference between "real life neural networks" and "virtual neural networks"?

I think you are confused. The reason why some neural neural networks have neurons with an output in range (-1, 1) all depends on the activation function used. Some networks even have neurons with an output range of (-Infinity, +Infinity) ( aka the identity function ).
I advise you to take a look at this list: activation functions w/ ranges.
Nowadays a lot of neural networks have a mixture of different activation functions. E.g. combining ReLU with Sigmoid or TanH.
This neural network library even shows that for most simple problems, neural networks prefer a variety of activation functions.
The red lines just mean that that connection has a low value in comparison with other connections.
There is no rule of thumb for activation functions, some problems benefit from a certain function, some don't.

From what I've read on deep nets and neuroscience, your interpretation is backwards.  Most 'neurons' in deep nets use RELU activations, which is strictly excitatory, while mammal brains are composed of both excitatory and inhibitory synapses/neurons.
https://en.wikipedia.org/wiki/Excitatory_postsynaptic_potential
https://en.wikipedia.org/wiki/Inhibitory_postsynaptic_potential
I think the reason for strictly excitatory activations like RELU in deep nets is that they provide a continuous gradient for backpropagation during learning.  Inhibitory activations make the gradient discontinuous, greatly complicating the propagation of feedback/error.

But sigmoids have negativ output as well, which acts inhibitory. For some problems you need activation functions that can be negativ. I think ReLU are widely used in vision because vision works largely by combining features, not so much by determining features that definitely shouldn't be there for certain classes.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
How to build my own text-to-image or image-to-image with GAN or StableDiffusion and run locally?
When I say "build" is not from scratch of course, is get a model pre-trained, such like Stable Diffusion, and "train again" with another kind of dataset or change parameters to a specific purpose.
I know there's a lot of services on internet offering this kind of stuff, some free, freemium or paid. But we all know that there's a 'mystery' of what happen to the date we input in this tools.
I'd like to test run a version of StableDiffusion locally optimized for some tasks like:
e.g
Text-to-Image -> For 2d game arts
Image-to-Image -> for apply filters such like aging, change colors, hide skin imperfections or even recreate a image in a differente scenario, like take a photo of yours on the beach and recreate on an office.
If you can provide links, articles and tutorials of this process would be great.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Are more than 8 high performance Nvidia GPUs practical for deep learning applications?
I was prompted towards this question while trying to find server racks and motherboards which are specialized towards artificial intelligence. Naturally I went to the SuperMicro website. There the chassis+motherboard which supported the maximum GPUs in the "artificial intelligence" category could support upto 8 of them. Additionally, the Nvidia DGX-1 also has only 8 Tesla P100 GPUs. And just to rub it in, Matlab does not support more than 8 GPUs last I checked.
So, are more than 8 GPUs practical for DL? I would take Caffe, CNTK, Tensorflow and Torch7 as reference.

I did some recent research on this topic. It all comes down to parallelization.
Basically there are 2 ways to do it: model parallelization or batch parallelization.
Model parallelization is when you split the model by layers among multiple GPUs. As per my best knowledge you can't split a layer between GPUs, so 8 GPUs would serve 8 layers that is very extensive. Tensorflow supports this method. In my opinion more than 6 doesn't make sense this way.
Batch parallelization is when you run the entire model on each GPU parallel and you split your batch and process it in parallel. This is done via a trick to define a larger batch that will be split and become the desired batch size after split. In this case batch splitting and updating the weights is done on the CPU (in case of Tensorflow) and after 3 GPU any additional GPU has only a marginal improvement on training speeds (as per reports). So here even 4 doesn't make sense and 8 is just crazy.  Here is an example of batch parallelization.
Alternately if you are good in coding you may want to have a look at this paper, section 3.5 where it is explained how 8 GPUs were utilized to serve a 4 layer LSTM network. Probably you can do things like this to utilize DGX-1 but as far as I know Tensorflow doesn't support splitting a layer to multiple GPUs. My conclusion is that it's already very hard to utilize 8 GPUs and above that bus speed becomes the bottleneck.

Extension:
I double checked on the bus speed and I was wrong, it should not be a problem. Most of the time consumed in training is computational effort of backpropagation.
Actually PCIe speed is limited by the CPU and the mobo chipset. The CPU has PCIe lanes to be allocated by the mobo. The strongest single CPU at the moment is Broadwell-E with 40 lanes (Skylake rumored to have 44). Mobo allocates that bandwidth either x16 or x8 to PCIe peripherals. So with a 40-lane CPU you can run 2 cards at x16 (2 * 16 = 32 < 40) or 5 cards at x8 (5 * 8 = 40). Here it needs to be mentioned that M.2 also uses PCIe lanes so for the latter option forgot and M.2 drive. A single CPU system will not take 8 GPUs, that's why they need dual CPU in DGX-1. The next limitation is the mobo chipset. The most powerful at the moment is the X99 and the C6 series. X299 will be announced next week if memory serves and probably a C6 replacement follows soon.
Since PCIe speed is not the bottleneck in machine learning the updated answer for your question would be the more GPUs the better. It seems the limit is 5 at x8 using PCIe 3.0, but more than that is rarely needed since layers can't be split between GPUs. (And the deepest NN that still makes sense may be considered as 5-6 layers.)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Zilberstein's "LP-dominate" pruning explained?
How does in the (famous Zilberstein) PR(uning) algorithm below the LP-dominate function get started: the first time it's called, D=∅ and the linear program deteriorates (i.e. no constraint equations)?
procedure POINTWISE-DOMINATE(w, U)
...
3. return false
procedure LP-DOMINATE(w, U)
4. solve the following linear program variables: d, b(s) ∀s ∈ S
      maximize d
      subject to the constraints
        b · (w − u) ≥ d, ∀u ∈ U
        sum(b) = 1
5. if d ≥ 0 then return b
6. else return nil
procedure BEST(b, U )
...
12. return w
procedure PR(W)
13. D ← ∅
14. while W = ∅
15.   w ← any element in W
16.   if POINTWISE-DOMINATE(w, D) = true
17.      W ← W − {w}
18.   else
19.      b ← LP-DOMINATE(w, D)
20.      if b = nil then
21.         W ← W − {w}
22.      else
23.         w ← BEST(b, W)
24.         D ← D ∪ {w}
25.         W ← W − {w}
26. return D

check a book about algorithms heuristics using python. good luck!

I think I found the solution. When in PR(W), D=∅, the weight is:
b[i] = 0          for { i | w[i]<max(w) },
and
b[i] = 1.0/max(w) for { i | w[i]==max(w) }.


text:
What is the difference between abstract, autonomous and virtual intelligent agents?
On Wikipedia, we can read about different type of intelligent agents:

abstract intelligent agents (AIA),
autonomous intelligent agents,
virtual intelligent agent (IVA), which I've found on other websites, e.g. this one.

What are the differences between these three to avoid confusion?

For example I've used term virtual artificial agent here as:

Basically a robot is a mechanical or virtual artificial agent which exhibit intelligent behavior (AI).

so basically I'd like to know where other terms like autonomous or abstract agents can be used and in what context. Can they be all defined under 'virtual' robot definition? How to distinguish these terms?

There is definitely a usage and etymological dimension to this issue, which I can elaborate on if you'd like.  (It's an issue I come across frequently, and is particularly relevant in regards to original work.)
The use of "Agent" may have arisen partly out of Game Theory, with ideas like "multi-agent systems", possibly because it's quite general (i.e. one does not have to say participant, or player, or actor, etc., and it is species non-specific.)
"Automata" seems to be favoured in some circles, and although this term was originally reserved for physical, mechanical devices, it now encompasses a range of physical and information-based systems (with perhaps a contemporary emphasis on the virtual. A famous extension is the categorization of Conway's Game of Life as a "cellular automata". Conversely, "robot" would seem to have usurped "automaton" for physical systems.)
I tend to use an agent when I'm thinking in an economic sense, or in a game theory sense as related to computing [see Rational Agent], and automata when thinking in a procedural sense in terms of algorithmic intelligence [see Automata Theory].  But the distinction is partly semantic.
Robot seems to be avoided in the academic literature in regards to information systems, possibly because of the deeply entrenched popular understanding of "robot" as physical automata.  The use of the informal "bots" for describing information-based systems seems to have arisen in the public sphere, almost certainly a product of hacker culture, which has a tradition of playfulness.  I like the term bots as it is being currently applied, but I feel it has the connotation of trivial (i.e. small and discrete) or massively multi-agent systems, and haven't really seen it used for "strong" narrow AI.*

Note: "Agent" does not automatically carry the concept of autonomy, although it is sometimes implied.  The use of the term is in the sense of "agency" as an action taken by an agent.  Agents may be acting on their own behalf, or as proxies.
*"Strong" in relation to AI is a term that seems to be evolving.  Initially reserved for Artificial General Intelligence and conscious algorithms, I've seen recent mentions by respected scholars of "strong narrow AI" to refer to recent milestones in Machine Learning. However, the term "strong" and "weak" in relation to mathematics and AI have a history in Combinatorial game theory per the concept of the solved game. Thus, there exist "strong AI" for games such as Nim, Hex, and Tic-Tac-Toe.
Again, there is an element of subjectivity here, but I tend to favour the CGT approach for two reasons:

It's a mathematical definition, unlike the philosophical definitions ("consciousness" and "humanlike" re: AGI)

Artificial Intelligence is rooted in combinatorial games.  [Nimatron may have been the first functional algorithmic intelligence and combinatorial games have been used as milestones since that time, most notably with Deep Blue, Giraffe Chess and AlphaGo.  Non-trivial Combinatorial games are useful because they have simple parameters but complexity akin to nature.

My sense of how "strong" is starting to be used is for algorithms, such as Machine Learning systems, that can outperform humans within a given set of parameters.  Thus "strong narrow AI".

On Intelligence:
The term "intelligence" is highly subjective and the only functionally meaningful definition I've come across is the concept of bounded rationality.

I don't think there are many contexts where there is any really meaningful distinction between these terms.  Even in the WP article you refer to, it is shown that "abstract intelligent agent" and "autonomous intelligent agent" are generally just synonyms for "intelligent agent" but used to highlight certain aspects of intelligent agents in some contexts.   Net-net, I'd say there just isn't any difference there that's going to matter in practice.
"Virtual intelligent agent" OTOH, used in the context you used it, suggests the distinction between an IA that's implemented in software only, versus one that has a physical manifestation.   I don't know how useful that distinction is and I haven't seen anybody else make it.
All in all, I expect that in almost every possible context, if you just say "Intelligent Agent" with no qualifiers, that's going to be sufficient.   But if there were going to be an exception, I'd say it would be around the term "autonomous" since an agent which is truly autonomous, versus one that needs to operate in a specific, constrained environment, is a distinction that - at least in principle - could be useful.

Some references would be useful.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
What's the term for death by dissolving in AI?
What's the term (if such exists) for merging with AI (e.g. via neural lace) and becoming so diluted (e.g. 1:10000) that it effectively results in a death of the original self?
It's not quite "digital ascension", because that way it would still be you. What I'm thinking is, that the resulting AI with 1 part in 10000 being you, is not you anymore. The AI might have some of your values or memories or whatever, but it's not you, and you don't exist separately from it to be called you. Basically - you as you are dead; you died by dissolving in AI.
I would like to read up on this subject, but can't find anything.

Not an answer to the question, but Kurzweil suggests that this will indeed not be called death at all, and we will still associate the self to the merged subject.

I don't know if you are looking for this but, the way answers are written this link   might help.

Leading contemporary AI fiction author and mathematician, Hannu Rajaniemi, has weighed in via tweet: "There could be supermind architectures where a humanlike mind can retain some identity, like a cell in a body. But these days I drift towards a Buddhist-ish view: we die through change all the time, and that's the price of living."  (This is an individual who is well versed the math and science that underlies  these fields, and can rightly be considered a leading philosopher of same, so I though it was worth reposting;)

@DukeZhou I tend to agree about the change being death. It's a somewhat weird viewpoint to take, but once you contemplate things like being randomly dropped in a different persons body, you quickly realize that all you are is a chain of events. Difference between two entities is mostly in continuity, I'd say. Although there's something to be said about the expansion of self, hence the AI question. If an AI can trace it's history back to me (to this exact moment of me writing a comment), does the memory count as me? There's still continuity from me to AI, but we're also two separate entities...

@DukeZhou ...therefore there must be an amount of change that feels like death. Or birth. Or both. P.S. Thanks for the great answer, btw!

I find the concept of the a Turing machine useful. In one dimension, everything is a string. All of the parts that are "not you" are merely a substrate, a medium for the program your_mind runs on top of. The you, your identity, the "metaphysical" component we think of as the mind, is a result of running the algorithm that is your_mind on the bioware of your body, or, the hardware (technically, "wetware".) So what we're really talking about is the software, and in that light I might use:

Translation

because the software is being translated to execute in a new environment, or

Migration

as in moving software from one system to another.
Philip Dick wrote a philosophical narrative, not technically sci-fi, called The Transmigration of Timothy Archer which is about identity moving between bodies. In a rare departure from his usual work about AI and the effects of a technological society on the human spirit, this book looks at the question of identity in the context of the soul, which opens up all kinds of philosophical questions surrounding the type of technology we're speculating on, particularly in relation to the self.
I value artistic insight, and Phillip K. is considered quite prescient, so perhaps

Transmigration

is most appropriate, as it carries both metaphysical and information technology meanings.

Re death by dissolution, it's worthwhile to look at the etymology of dissolve:

late 14c. (transitive and intransitive) "to break up" (of material substances), from Latin dissolvere "to loosen up, break apart," from dis- "apart" (see dis-) + solvere "to loosen, untie," from PIE *se-lu-, from reflexive pronoun *s(w)e- (see idiom) + root *leu- "to loosen, divide, cut apart." Meaning "to disband" (an assembly) is early 15c. Related: Dissolved; dissolving.

I think you're on the right track with dilution, certainly per the modern usage, but it may be possible to get more precise.
It's not about breaking up, or washing away (except metaphorically); rather, it's about minimization as in the diminishment of the original software kernel (the self) in relation to an expanding algorithm.

early 15c., from merger of two obsolete verbs, diminue and minish. Diminue is from Old French diminuer "make small," from Latin diminuere "break into small pieces," variant of deminuere "lessen, diminish," from de- "completely" + minuere "make small" (from PIE root *mei- (2) "small").

The Old French diminuer is apt, as is the Latin deminuere and deminuo, which also carries a meaning of "civil death" and "abatement". Abatement carries a meaning of mitigation, which can be defined fundamentally as "lessening of effect," in this case of the kernel of the original self in relation to the new aggregate.
It may be useful to think of it as a ratio 1/ℵ, with the self as the 1. Important to note the ratio is not literal--each number represent an aggregation of functions we call programs.
That's how I'd think of it mathematically, but metaphysically, Nat nails it by referencing Jung and the death of the ego.
Ego comes from the Latin noun for the self (I, me) which can also be plural (we, us).  It's also fun to note that the Latin verb of being is sum, because in English, sum has a mathematical meaning of an aggregate considered as a whole.
Because we're talking about what it means to be a person, but we also want to connote a function (a process of relative minimization) I am thinking:

Depersonalization

(noun) the action of divesting someone or something of human characteristics or individuality.SOURCE: Google

The fun part is that there's a legal definition of person:

In legal use, "corporate body or corporation having legal rights," 15c., short for person aggregate (c. 1400), person corporate (mid-15c.)

Which I think applies (loosely) to the aggregation of function that comprises the program we call the self, and the greater aggregation of functions that form a new self.
Because here we're talking about the loss of the original individual, depersonalization as opposed to repersonalization as a corporate entity.
Alternately, I might propose:

Deindividualization

with the definition "a loss in individual identity within a group" (also known as deindividuation).
(Charles Stross wrote about this in Accellerando, where a character chooses to be subsumed by a group intelligence as the only means of escaping a swarm of autonomous lawsuits;)

"Ego death"

Ego death is a "complete loss of subjective self-identity."
-"Ego death", Wikipedia

The defining aspect of an ego is an exclusive sense of self.  If an ego-dominated individual joined a greater mind and dissolved within it without really dying, then the only thing that it's really lost is its ego.
Real world analogy: political states' identities dissolving into larger states
For a real-world analogy, the United States used to be composed of individual states that had a much stronger sense of self-identity; it different states were sort of like different countries.
Over time, this distinction's been fading away, and most Americans tend to have little concern for by-state distinctions.  For example, someone from Canada is a foreigner even if the Canadian border is close by, but someone from the other side of the US is still basically just another American.
Today, this process repeats itself as individual nations merge under the United Nations.  Some of the recent political battles have been fought between globalists who embrace this great unification and nationalists who wish to maintain clear, distinct state identities and interests.
It's not sudden
Ego death won't typically be sudden.  Rather, the smaller mind would join a larger one by creating new connections over time.  For quite a while, there're still be a meaningful distinction between the ego and the rest of the collective mind.
As time goes on, new connections will keep being created and removed, just like in a normal human brain.  The relative lack of connections between the individual's mind and the larger collective mind will tend to fade away.
Eventually, the distinction between the mind and the larger collective becomes essentially meaningless.
Once the mind no longer cares or is able to distinguish itself from the larger collective, their ego/sense-of-self is "dead", or as you've said, dissolved into the AI.

Thanks for your answer, btw.  (You nail it and, full disclosure, I wasn't even fully understanding the question until I read your answer;)  My only thought is that ego death is a threshold that is crossed, but surely implies the function leading to that threshold.


text:
How many GPUs can these deep learning algorithms be parallelized across (batch parallelization)?
The deep learning algorithms I would to know the limits of are:

CNTK
Caffe
TensorFlow
Torch7
Theano

For example: I've heard TensorFlow is near impossible to parallelize on 8 GPUs and above. So, in this case, the limit would be 8.

Disclaimer: this answer refers solely to TensorFlow, as my knowledge of the remaining frameworks is limited.
Where did you hear that TensorFlow is near impossible to parallelize on more than 8 GPUs? With a large enough network, any number of GPUs can be used to speed-up training, as shown in the tutorial. This snippet of code introduces the multiplication of 2 constants in 2 separate GPUs. This allows you to run the graph on both simultaneously.
for d in ['/gpu:2', '/gpu:3']:
    with tf.device(d):
        a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3])
        b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2])
        c.append(tf.matmul(a, b))

Even if there were some sort of limit on how many GPUs TensorFlow can use per process, TF can be distributed across processes and machines. Asynchronous algorithms (like A3C) can be spread across, for example, 16 machines (what I am doing in my laboratory), where each machine uses its resources (in my case, I use CPU, but the change to a GPU would be trivial).
With a complex enough network and a well implemented solution, you can take advantage of any hardware resources you have.

Also, in order to be in competition with tensor flow, most other deep learning architectures support this (or have plans to) as well.

As an example for Caffee: Facebook parallelized the training of a
Res-Net CNN over 256 GPUs


text:
Is Lisp still worth learning today in the particular context of Machine learning?
Lisp was originally created as a practical mathematical notation for computer programs, influenced by the notation of Alonzo Church's lambda calculus. It quickly became the favored programming language for artificial intelligence (AI) research, according to Wikipedia.
If Lisp is still used in AI, then is it worthy of learning it, particularly in the context of machine learning and deep learning?

Possible duplicate of Is Lisp still being used to tackle AI problems?

All languages have their advantages. LISP has many advantages which still makes it good for use in AI. This link will help.

This question/answers will be a nice place to look.

Please, next time ask a question that can be answered more objectively. Asking if something is "worth learning" will lead to opinions. A better way of wording this would be "What are the pros of using Lisp for this task X?". Keep this in mind next time!

LISP was popular because back in the old days of AI because of the functional syntax, which worked well with the GOFAI paradigm of the time.
Nowadays most researchers have given up on the classical computational theory of mind (read: language of thought), and thus also the GOFAI paradigm that it associates with.
LISP is not what you want to learn if you want to do neural network stuff, but the philosophical background is still important to know.


text:
Neural network for pattern recognition in audio
I'm trying to make a neural network that detects certain instruments in a song. I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?

Without knowing anything about this problem, the question that pops into my mind is "are you looking at patterns to determine the number of instruments in a recording, such as a popular song or symphony?"

I don't know for sure if I should use an RNN, CNN OR DNN. Which one is best for this situation?

This question or variations of of crop up a lot in DataScience stack exchange too. To paraphrase:

I am trying to do something with X data, and I have a lot of choices for the model. Which is best?

Unfortunately, the answer is generally:

It depends on all the fine details of your project
Unless someone has done almost your exact project recently (so they were using latest techniques of the model type), then no-one knows a priori which model will get the best result.
Optimising machine learning is very much an empirical subject. If you want to know whether A is better than B, you have to try both and measure their performance.

In your case, I think that CNNs and RNNs are both applicable (and you might want to look at a WaveNet-like architecture, which is a variant of CNN, but that could be a bit too advanced to start with). You might have a slight preference for RNN as a starting point if the sequence length to process varies significantly, such that padding input to a CNN would be inefficient. You may also prefer an RNN if the output of your model needs to be a sequence, and doubly so if the output sequence varies in length and is not directly related to the input sequence length (think of natural language translation).


text:
Is there a way to protect humanity against the impending singularity?
We are careening into the future which may hold unpredictable dangers in relation to AI. I've haven't yet heard of Chappie or Robocop style police robots, but militarized drone tech is replacing many conventional weapons platforms.  I love the idea that I may one day be able to transfer my consciousness to a computer, and improve my capabilities and potential.  However, what constitutes morality can differ greatly among individual humans.

How do we move forward toward the singularity in a way that protects humans, as opposed to possibly lead to our extinction?

I'll think about a formal answer, but in the meantime, I highly recommend reading The Quantum Thief Trilogy by mathematical physicist Hannu Rajaneimi.  He gets into these issues in very fine detail, and is a
Cambridge-trained mathematician in addition to being a fiction writer.

What you are talking about is known as the Control Problem. We have our own tag for this specific topic here, which you can use for this and similar questions.
How to address the control problem is heavily discussed and still considered unsolved. Two of the important approaches are motivation control and capability control.
Motivation control aims at creating suitable reward functions that only reward behavior that's beneficial to the human race. This topic alone is so complex that many different competing theories exist. Minor errors in the definition of an AI's goal might lead to catastrophe.
Capability control aims at limiting the possible scope of action for the AI. The main problem here is, that most restrictions make the AI less useful. And to ensure robust control a lot of restrictions must be put in place. Finding the right tradeoff is a challenge we need to solve.
In addition to those two mechanisms we must think about how we create a superintelligence. One of the major aspects here is our understanding of the underlying technologies. If we create a self-optimizing neural network from scratch, which we do not understand in depth, it is very likely that we will not understand the potential threats before it is to late. Creating a digital copy of a human brain as a starting point on the other hand is a little saver, because we can assume that it will be driven by similar factors as a real human being. If that's desirable is a totally different discussion of course. But the general idea is, that understanding the motivation of a superintelligence is key for steering it in the right direction.
For more details about the topics I scratched in my answer and the control problem in general, I recommend reading Superintelligence by Nick Bostrom. He spends many chapters on those problems and possible solutions.
If you have more in-depth questions concerning specific topics, please open a new question to get a more detailed answer.

If a team of humans create a device with greater intellectual capacity than the humans of that team and similar flexibility in the use of that capacity, then there can be no guarantees that the invention cannot then fool or force its maker into subservience or oblivion. The proposals for control are as naive as the former belief among mathematicians and physicist that higher ethics would prevail once the atomic weaponry was developed.

@FauChristian That's exactly why the control problem is so difficult and still unsolved. Maybe we won't be able to solve it at all. I don't assume in my answer that the proposed methods of control guarantee a positive outcome. I summarized what current researchers and philosophers propose to reduce the risk of AI. Nick Bostrom (see link in answer) does a great job at explaining many of those approaches and how they will most likely fail.

@DouglasDaseeco Our advantage over apes in your example is the fact, that the human evolved naturally while a superintelligent AI will (most likely) be designed. Once it has been created, thinking about measures of control is far too late. The only chance is establishing control mechanisms before the AI can intervene. If such mechanisms can be strong enough is still an open debate. We should nevertheless think very hard about this problem and study it in detail, because (at least in my opinion) it is highly unlikely that we won't be able or willing to create a superintelligence in the future.

To clarify my evolved vs. designed argument - the designer has the chance to set restrictions and measures before the new creation is built and can counteract. If the apes had the chance to design the human without arms, legs and eyes for example, we wouldn't have been able to dominate the planet the way we do now, although we would have the same intellectual capacity.

This kind of control is what I've been studying and building for many years. This question of the cloning of a human brain is often confused with works of fiction. We have a good base of information with current social networks and specific communities. We can collect problems, doubts, desires, happy moments, fears, hates, etc. I believe we can raise more issues on the subject, we are on the right track. Generating subjects.

Impending or Past?
Niel Postman, in his book, Technopoly, argues the preemption of human centered culture to technically driven culture has already occurred.  Jaques Ellul, in his book, Technological Society, heaped evidence behind the proposal that technology became autonomous centuries ago.  Their arguments are convincing.
Some think other criteria must be met before the balance of power has been tipped in favor of some class of machines, but the traditional criteria proposed for determining when humans have been dominated are intellectually impoverished.  Let's look at some of those criteria.

Self awareness
Superior intelligence
Self-improving

Self-awareness
Self-awareness is likely to be a continuum, not a threshold.  The first time an assembler assembled itself, that continuum began, followed by compilers that can compile themselves, followed by neural nets that can construct and tune neural nets.  The dimensions of self-awareness are numerous, and complete self-awareness in each respect is rare.  For instance, knowing our own motive is often guessed at after we exercise it.  If we are honest about our own species, self-awareness in the typical human is intermittent and incomplete.
Superior Intelligence
Superiority in intelligence cannot be determined by a chess tournament; the vanquished chess player could possibly, on the day of the defeat, invent a new field of study.  Neither Lavoisier nor Newton, if alive today, would be able to prevail against a chess program, yet no machine exposed only to information prior to the advent of modern chemistry, calculus, or physics would be able to take the steps Lavoisier or Newton made in the creation of those fields.
Intelligence is multidimensional too, and metrics to measure intelligence are unreliable.  Using simplistic definitions of intelligence, devices of steel, plastic, epoxy, and silicon already exceed that of humans.  Should graduate students seek out a university librarian for an answer to a question about data science or use Google Scholar?  A mail sorter uses intelligent robotics to ensures we get the right mail.  The actual mail delivery people occasionally deliver a parcel into the wrong mailbox even when the street address is clearly printed in one decimeter high Arial font digits on the approaching side of the mailbox.  We use a CAD program to check a mechanical design clearance.  Arithmetic is clearly the domain of computers.
Humans give destinations to a program and instructions are given back to the human.  The human essentially rents this intelligent service.  Once the instructions are given, the human becomes subservient and is expected to drive.  Even upstream in the transportation process, when the destination is chosen, to a large degree it is a technology driven need that often creates the demand for transportation.  Intelligence is not always correlated with power either.  How intelligent are long blades of grass and a broken lawnmower?  Yet they can send their legal owner across town to pick up parts and consume their entire day off to repair and mow.
Self-improvement
Self-improvement is a slippery concept as well, whether an individual entity can improve itself in real time or is able to construct improved versions of itself.  Robotics creating robotics technically began during industrialization when milling machines made parts for milling machines.  Human supervision was involved then.  Using current technology, it is quite possible that an advanced manufacturing plant could be devices that could out other advanced manufacturing plants without supervision.  That is the mechanical dimension of self-improvement.
If a neural net converges on a reasonably optimal weighting for a given criteria, the assumption required to call this self-improvement is that the target categorization is correct.  Where power is concerned, self-improvement would be measured by what?  Control over resources?  Domination?  Is that improvement?  Perhaps ethical superiority?  Can subservience be considered a goal state without severely curtailing the creative and intuitive aspects required to achieve human-like intelligence?
Is Singularity Realistic?
In light of this complexity, is the tipping of power between humans and machines discrete or singular?  Clearly not.  Calling changes in the balance of power between human driven culture and machine driven culture a singularity is naive.  We do not need to be attacked by machines to loose our culture or autonomy to technology.
We Seem to Know at Some Level
This reality expresses itself subconsciously.  Young adults express violent feelings against their mobile devices when it delivers unpalatable social information.  Then they dodge the question when others inquire about the broken device display.  When the device finally ceases to function, they are compelled to buy a new mobile device, a device they need and pretend to like.
Another More Interesting Criteria: Utility
Human autonomy is dwarfed by the demands of the tools created for lifestyle improvement to the point that one can no longer, with formal logic, clearly differentiate which is the tool and which is the user.
This last criteria to judge when humans have become subservient to machines can be illuminated by a single test question, "Which is the tool and which is the user?"  When the distinction is blurred, the dominance has already entered a shared state.  Entrance into the vicinity of a tipping point, if such a tipping point actually exists, has already occurred in many regions of the world.  The multidimensional nature of the balanced thus far discussed indicates that there exists a complex balance with no clear point of victory or defeat.
Irreversability
Nonetheless, the failure of the Unibomber and other Luddites to dent the onslaught of technology indicates that the relinquishment of autonomy to machines is likely irreversible.  Therefore, there may be no value in being concerned.

he big question is what is the next step in Artificial Intelligence. What would be the next step? How will control be done? The great pioneers are making low-signed to prohibit AI's creation of killers. What we know about AI today is not enough to determine anything. Remembering that Google made things easier by launching TensorFlow and free content on how to use it to create Artificial Intelligence models, that theme spread absurdly across the planet. It's a new story that I believe will be in the next generation's schools. Something essential.

@GuilhermeIA Since the earth is loaded with killer humans, the probability that widespread machine learning development would not eventually lead to the creation of systems that kill is vanishingly small. Asimov foresaw this and introduced the Three Laws. Humans are only slightly self-aware and even less other-aware. If we could engineer devices that are guaranteed to be as other-aware as they are self-aware, then the Golden Rule could prevail. If so, then perhaps such machines could teach humans not to bomb strangers for gold, ivory, salt, diamonds, petroleum, and to introduce new order.

Our assistants will become our mentors or leaders. haha

Predicting what happens post-singularity is simply not possible as we cannot attempt to model let alone conceptualise a mind far more complex than ours. If that is a difficult concept to get your head around, consider how far an insect's central nervous system could go in understanding human behaviour.
That fact alone is an argument against the likelihood of success for attempting any type of control.
But in terms of 'defending' against a post-singularity mind well before it happens (ie now) there are 2 solutions, with only the first offering a good likelihood of success albeit only for as long as everyone cooperates:

identify the technology types that are anticipated to enable the singularity,  register them as 'instruments of human extinction' and regulate them accordingly ;
ensure technology in human augmentation is sufficiently advanced
to enable human-mediated guidance/fusion during the exponential rise
in computation that will occur prior to the singularity event.

In any case, as mentioned, it is impossible to predict the behaviour of a post-singularity mind and even a human hybrid will similarly be unpredictable due to its exponentially increased cognitive/computational complexity.
An interesting consideration is the possibility that numerous singularity-level minds have already spawned in other parts of the universe (based on the likelihood of other civilisations a) existing and b) reaching that level of technological advancement).

Contact with other civilizations can contribute to a surreal advancement in technology, if there is intelligence superior to the human across the universe ... or even here on Earth.


text:
Finding the right questions to increase accuracy in classification
Lets say I have a list of 100k  medical cases from my hospital, each row = patient  with symptoms (such as fever , funny smell, pain etc.. ) and my labels are medical conditions such as Head trauma, cancer , etc..
The patient come and say "I have fever" and I need to predict his medical condition according to the symptoms.According to my data set I know that both fever and vomiting goes with condition X. So i would like to ask him if he is vomiting to increase certainty in my classification.
What is the best algorithmic approach to find the right question (generating question from my data set of historical data). I thought about trying active learning on the features but I am not sure that it is the right direction.

The problem you're trying to address can, in some sense, be viewed as a Feature Selection problem. If you look for literature using only those words, you're not going to find what you're looking for though. In general, "Feature Selection" simply refers to the problem where you already have a large amount of features, and you're simply deciding to select which ones to keep and which ones to throw away (because they're not informative or you don't have the processing power to try training with all features for example).
I'd recommend looking around for a combination of "Feature Selection" and "Cost-Sensitive". This is because, in your case, there are costs associated with selecting features; values may be costly to obtain for some features. Searching for this combination leads to publications which look to be interesting for you, such as:

Cost-sensitive feature selection using random forest: Selecting low-cost subsets of informative features
Cost-sensitive Dynamic Feature Selection
Cost-Effective Feature Selection and
Ordering for Personalized Energy Estimates
and probably much more...

I cannot personally vouch for any of those techniques since I've never used them, but those papers certainly look relevant for your problem.

When you're looking around for more literature, terms like "cost", "cost-based", maybe "budgeted" are crucial to include. If you don't include those, you're just going to get papers on problems like:

Feature Selection: given a set of features/columns, which ones am I going to use across all samples/instances/rows?
Feature Extraction: given data (typically without clear human-defined features, like images, sound, etc.), how am I going to extract relevant features from this?
Active Learning: given a bunch of samples without labels but feature values already assigned, which one would I like an oracle/human expert/etc. to have a look at so that they can tell me what the true label is?

Those kinds of problems all do not really appear to be relevant in your case. Active Learning may be somewhat interesting in that it is about trying to figure out which rows would be valuable to learn from, whereas your problem is about which columns would be valuable to learn from. There does seem to be a connection there, Active Learning techniques might to some extent be able to inspire techniques for your problem, but just that; inspire, they likely won't be 100% directly applicable without additional work.

Thank you @Dennis for the detailed answer. I have read the material you've added about cost-sensitive feature selection . Although it seems to be very related ,i'm wondering how come the amount of papers in this subject so thin. Is there a chance that there are more "names" or methods to deal with this issue?.

also , since i do not have any cost in asking the patient question (lets say that i can ask couple of questions for free ) it is hard for me to think about a cost that can be calculated here. so the ordering of features to ask about should not be cost related but more of prediction interval related . i mean , if you have fever the classifier can say in P=0.3 that it is condition X and 0.2 Condition Y  ,but if i'l know that you are also vomiting , i could be sure in 0.8 that it is condition X, then i'm asking the user if he is vomiting  .

@Uri By searching for "active learning features" I was able to also find https://users.cs.duke.edu/~amink/publications/manuscripts/hartemink05.icml.pdf which seems interesting. Still, they don't appear to give a new, easily-searchable name for this problem setting, and with that kind of search questions you do also find lots of less relevant results. As for defining costs for asking the patient questions, you could, for example, view the expected gain in accuracy as a "negative cost" (or just a "reward") for asking a question. Then you can minimize those "negative costs" / maximize "rewards"

That would turn it in some sort of Reinforcement Learning problem (or Multi-Armed Bandit problem), which I believe would be most closely related to the second link in my answer. I may be "biased" towards thinking of such approaches though since I'm mostly in RL myself, it may not be the best way to think about the problem. It is a way of thinking about the problem that I personally find interesting though

Feature Extraction
Patterson and Gibson's Deep Learning, A Practitioner's Approach, O'Reiley, 2017 states, "Convolutional Neural Networks (CNNs) ... consistently top image classification competitions," which is consistent with our experience in the lab.  If your data is multi-dimensional in that pain is on a scale from one to ten, fever is in degrees, and smell can be a result of blood components which can be quantified in lab reports, you can have a hypercube that can be treated just as frames in a movie can.  Movie learning is in ℝ4, the third being frame index and the fourth being sample index.  With subjective pain, digital thermometer temperature, and three blood component concentrations, you have {P, T, C1, C2, C3} and learning in ℝ6 for your CNN design.
Selecting Input Channels
Asking 100 questions and taking 10 blood panels is probably prohibitive.  So you will need to stuff all the data from limited questioning and panels into a hyper-cube and find what will similarly extract features from sparse data input.  Then the weighting leading from input to feature layers will identify the questions from which the most important features can be extracted.  By searching scholarly articles for, "Feature extraction sparse data," a large number of options will be presented.
Breast cancer diagnosis based on feature extraction using a hybrid of K-means and support vector machine algorithms, B Zheng, SW Yoon, SS Lam - Expert Systems with Applications, 2014 - Elsevier may be particularly interesting, given the common domain.
Outcomes Analysis
The above is a limited approach because the loop is not closed.  Only if the outcomes of treatment are used to produce labels or a real time (over the course of months or years) reinforcement will the system produce an optimization that is meaningful.  Unsupervised learning for this particular problem is not likely to produce any significant improvement in treatment efficacy.

Thanks @FauChristian for your answer. My issue is more on the categorical domain , since i can only hear the symptom from the patient and ask him about other symptoms . no blood test /fever measurement available. Only yes/no answers. "fever? " - "no"  , "vomiting?" - yes ...etc.


text:
Dealing with "blank" inputs in prediction of a neural network?
Say I'm training a neural net to compute the following function:
(color_of_clothing, body_height) -> gender

When using this network for prediction, I can obviously plug in a pair (c, b) to receive a predicted g, but say I want to get a prediction only based on c or only based on b, can I use the same neural net somehow? Or would I need to train two separate neural nets c -> g and b -> g previously?
Or more generally, can I use a neural net that was trained to predict A -> B to make predictions on values from a subset of A, or should I train separate neural nets on all subsets of A that I'm interested in?

I think the answer to your question would be "yes". Though inference would always be best if you provide representative training data. For example you can train your net with (c, b) pairs, (blank, b) pairs, and (c, blank) pairs. That would make the net more robust and likely to support your use case. Training separate nets for each case would be more efficient and accurate - but I'm not sure what your goals and constraints are.
The point is a "blank" input can be trained for as well in the same net. In your case it's a new kind of body_height or color_of_clothing. I also suspect you might have issues with how you encode blank because e.g. rgb(0, 0, 0) would be black, and perhaps you intended to model blank as zero which would mean a blank is black.


text:
How to use Machine Learning with simple games?
I built a simple HTML game. In this game the goal is to click when the blue ball is above the red ball. If you hit, you get 1 point, if you miss, you lose 1 point. With each hit, the blue ball moves faster. You can test the game here.

Without using machine learning, I would easily solve this problem by just clicking when the X, Y of the blue ball was on the X, Y of the red ball. Regardless of the time, knowing the positions of the 2 elements I could solve the problem of the game.

However, if I wanted to create an AI to solve this problem, could I?
  How would it be? I'd really like to see the AI randomly wandering
  until it's perfect.

My way to solve the problem
I click many times and watch score. If score down, add to bad_positions. If actual position in bad_positions, not click. At first he misses many times, then starts to hit eternally. This is machine learning? Deep learning? Just a bot?
var bad_positions = [];
function train(){
  var pos = $ball.offset().left;
  var last_score = score;
  if (!bad_positions.includes(pos)) {
   $('#hit').click();
    if (score < last_score){
      bad_positions.push(pos)
    }
  }
}

You have implemented a simple contextual bandit solver, which is a machine learning algorithm. A few details may be different from a full implementation, but the key elements are:

A choice of actions (click hit or don't click hit)
A reward signal that can be observed after each action (+1 for a hit, 0 for nothing happens, -1 for an attack which misses)
An observable state which affects the reward achievable (the position of the blue ball). For a contextual bandit, the state is not influenced by the action taken. This is true here.
One thing that is different about your problem from a classic contextual bandit is that the next state is predictable from the current state (whilst in a pure bandit problem it should be entirely random). However, that's not too important to your problem here, and your solver is definitely following a contextual bandit approach.
Your solver tests the score from trying different actions in each state, and narrows down the best action to take in each state. Your implementation is simple and "greedy" for a contextual bandit solver. A more typical solution would maintain an average result for each action and have a rule for how to explore actions in each state, so it could test whether results were reliable (this is very helpful with non-deterministic scenarios where bandit solvers are more often used).

With each hit, the blue ball moves faster

Unless you somehow limit the reaction time of the agent, this is not relevant to how you write the solver. You could change the rules affecting the agent to make it relevant in the same way as it would be for a human, e.g. deciding to click means the click happens 0.1 seconds later, and the state can include observations of position just now and several 0.02 seconds going back.
In general, if you want to take this further, with more complex games and still learning how to control agent actions, you could look at simple reinforcement learning agents, such as Q-learning. If you are interested in the underlying theory of agents like this, then a good (and free) introductory text is Sutton & Barto "Reinforcement Learning: An Introduction"

In my case, if the red ball change position, the solver don't work anymore... thank you, I will read this.

@GuilhermeIA: An obvious extension to your solver there is to add the position of the red ball to the state. That adds another dimension so makes the problem a lot harder, as your learner will need to track far more states in order to learn that red and blue need to be coincident when it tries to hit.


text:
Identifying geometry in images
There is a lot of information on the internet about image classification and object identification. I want to know how I can extract (or create) geometric information from an image.
For example, if the image classifier can identify that there is a sphere in the image, how can i generate 3d vertices's and edges from that knowledge?

I want to find all the edges and points on these shapes

To obtain the edges, you need to use an edge detector. Many exists, more or less efficient depending on the input image. Among the most broadly used are the Sobel and the Canny edge detectors that are implemented in many libraries for various programming languages. (Matlab, scikit-image in Python)
To obtain straight lines from these edges, I suggest that you start by using the Hough transform also available in many libraries for various programming languages. (Matlab, scikit-image in Python)
Lines output from the Hough transform are usually given in there parametric form. From there, it is easy to find the angles between the different lines. I imagine that some rules can be derived from there to identify a regular polygon that is in the image.
Regarding obtaining 3D information from an image, note that there isn't enough information in a single 2D image to reconstruct its 3D coordinates, since we are projecting information into a lower dimensional space.


text:
Calculating gradient for log policy when variance is not constant
I've noticed that when modelling a continuous action space, the default thing to do is to estimate a mean and a variance where each is parameterized by a neural network or some other model.
I also often see that it is one network $\theta$ models both. The REINFORCE objective can be written as
$$\nabla \mathcal{J}(\theta) = \mathbb{E}_{\pi} [\nabla_\theta \log \pi(a_t|s_t) * R_t] $$
For discrete action space this makes sense since the output of the network is determined by a softmax. However, if we explicitly model the output of the network as a Gaussian, then the gradient of the log likelihood is of a different form,
$$\pi_\theta(a_t|s_t) = Normal(\mu_\theta(s_t), \Sigma_\theta(s_t))$$
and the log is:
$$\log \pi_\theta(a_t | s_t) =  -\frac{1}{2} (a_t-\mu_\theta)^\top \Sigma^{-1}_\theta(a_t-\mu_\theta) + \log 2 \pi \det({\Sigma_\theta})$$
In the slides provided here (slide 18):
http://www0.cs.ucl.ac.uk/staff/d.silver/web/Teaching_files/pg.pdf
IF the variance is held constant, then we can solve this analytically:
$$\nabla_\theta \log \pi_\theta(a_t|s_t) = (a_t - \mu_\theta) \Sigma^{-1} \phi(s)$$
But, are things always modelled assuming a constant variance? If it's not constant then we have to account for the inverse of the covariance matrix
as well as the determinant?
I've taken a look at code online and from what I've seen, most of them assume the variance is constant.

@NielSlater
Using the reparameterization trick we would use a normal distribution with fixed parameters 0 and 1.
$$ a_t \sim \mu_\theta(s_t) + \Sigma_\theta(s_t) * Normal(0, 1) $$
Which is the same as if we had actually sampled directly from a distribution, $ \pi_\theta(a_t | s_t) = Normal(\mu_\theta(s_t), \Sigma_\theta(s_t))$ and let's us calculate the corresponding $\log \pi_\theta(a_t|s_t)$ and $\nabla_\theta \log \pi_\theta(a_t | s_t)$ without having to differentiate through the actual density.

In your formulas, what is the variance? I understand that $\mu_\theta$ is the mean with respect to the current parameters $\theta$. $\Sigma$ is the covariance matrix, but of which random variables? I think it may be helpful to specify these details, so that readers can better understand your question. In general, I think you should try to explain the formulas that you provide, if possible.

Hi, the covariance is parameterized by $\theta$ in the second equation. In the fourth equation I leave out the $\theta$ because in the slide is says in the case where the covariance is constant.

But is this the covariance of which variables? Maybe it is the covariance of the state and action (assuming they are considered random variables in this case), even though you denote it just as $\Sigma_\theta(s_t)$ instead of maybe $\Sigma_\theta(s_t, a_t)$. Or maybe $\Sigma_\theta(s_t)$ just represents the variance of $s_t$? Honestly, I'm not sure what that means, anyway.

@nbro I'm not sure I understand. It is the mean and covariance that models a distribution over actions which I have assumed to be gaussian. In reinforcement learning this is quite a common thing to do I believe. Each of those is estimated from the same neural network that is parameterized by $\theta$.

This part of RL maths is something I am not yet familiar with. However, I believe the answer will be based around the "the reparameterization trick" . . . if no answer is given and you can figure out the link to the equations you have given, actually I'd be interested to see this Normal distribution with $\mu$ and $\sigma$ outputs from the NN worked through with an example . . .

@NeilSlater I've included a short edit of how (I think) it would work with the reparameterization trick. Though I'd heard of it used in VAEs, I'd honestly never heard it mentioned in the context of RL and going through a lot of code I'm surprised to see that the majority of modelling is done with constant variance. Seemed strange!

Both VAEs and RL policy gradients with stochastic policies use the trick. My understanding is that you cannot propagate gradient through a sampling node otherwise. And the initial error signal in RL relates to the actual action chosen, not the values of the NN output.

It's true that computing the log prob of a sample from a gaussian requires inverting a matrix and dealing with the determinant in the general case of a full covariance matrix. If you wanted to backprop through the log prob, you'd need to backprop through these operations, which by the way are available as differentiable operations in pytorch. See the gaussian distribution class which deals with these operations: https://github.com/pytorch/pytorch/blob/master/torch/distributions/multivariate_normal.py#L177
You can see there's a half_log_det and although you won't find an explicit matrix inversion, you'll see that it uses a differentiable triangular linear solve (torch.trtrs) at some point, which is essentially doing a matrix inversion in a more efficient way.


text:
How much extra information can we conclude from a neural network output values?
Consider I have a 3 layers neural network.

Input Layer containing 784 neurons.
Hidden layer containing 100 neurons.
Output layer containing 10 neurons.

My objective is to make an OCR and I used MNIST data to train my network.
Suppose I gave the network an input taken from an image, and the values from the output neurons are the next:

$0: 0.0001$
$1: 0.0001$
$2: 0.0001$
$3: 0.1015$
$4: 0.0001$
$5: 0.0002$
$6: 0.0001$
$7: 0.0009$
$8: 0.001$
$9: 0.051$

When the network returns this output, my program will tell me that he identified the image as number 3.
Now by looking at the values, even though the network recognized the image as 3, the output value of number 3 was actually very low: $0.1015$. I am saying very low, because usually the highest value of the classified index is as close as 1.0, so we get the value as 0.99xxx.
May I assume that the network failed to classify the image, or may I say that the network classified the image as 3, but due to the low value, the network is not certain?
Am I right thinking like this, or did I misunderstand how does the output actually works?


text:
How can I detect datetime patterns in text?
I want to explore and experiment the ways in which I could use a neural network to identify patterns in text.
examples:

Prices of XYZ stock went down at 11:00 am today
Retrieve a list of items exchanged on 03/04/2018
Show error logs between 3 - 5 am yesterday.
Reserve a flight for 3rd October.
Do I have any meetings this Friday?
Remind to me wake up early tue, 4th sept

This is for a project so I am not using regular expressions. Papers, projects, ideas are all welcome but I want to approach feature extraction/pattern detection to have a model trained which can Identify patterns that it has already seen.

Can you clarify; the patterns that you are looking for, are they fixed in size (always extend across the same number of time-steps)? Also, have you looked at sliding/neural nets for timeseries prediction....approaches?

"are they fixed in size" no, they could be in any of the generally used formats, I'll that that up in the question. " have you looked at sliding/neural nets for timeseries prediction" no, I am fairly new to nlp :)

Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs instead of giving us examples based on what you assume. So this demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer

This question seems to be too broad. In the body of the post, you talk about "patterns". In the title, you talk about "datetime patterns". Moreover, as suggested above, before asking a question, it's expected that users do a little bit of research.

Approaches
There are two main approaches to detecting any human readable representation of a discrete quantity within text.

Detect well known and stable patterns in the input stream and by adjacency determine the output stream.
Windowing through the text in the input stream and directly detect the quantities.

There are other approaches and there are hybrids of these two or one of these and the other approaches, but these two are the theoretically most straightforward and likely to produce both reliability and accuracy.
Re-entrant Learning
Whether the training involves re-entrant learning techniques, such as reinforcement, is a tangential issue that this answer will not address, but know that whether all training is solely a deployment component or whether adaptation and/or convergence occurs in real time is an architectural decision to be made.
Practical Concerns
Practically, the outputs of each recognition are as follows.

Starting index
Ending index
Integer year or null
Integer day of year or null
Integer hour in military time or null
Minute or null
Second or null
Time zone or null
Probability the recognition unit was correctly identified
Probability the recognition produced accurate results

Also practically, the input must either be from within one particular locale's norms in terms of

Calendar,
Time,
Written language,
Character encoding, and
Collation,

... or ...

The learning must occur using training sets that include the locales that will be encountered during system use

... or ...

Much of the locale specific syntax must be normalized to a general date and time language such as this:
जनवरी --> D_01
Enero --> D_01
Janúar --> D_01

so that Filipino and Icelandic names for the first month of the year enter the artificial network as the same binary pattern.
**Date and Time Specifically*
In the case of 1. above, which is semi-heuristic in nature, and assuming that the locale is entirely en-US.utf-8, the CASE INSENSITIVE patterns for a PCRE library or equivalent to use as a search orientation heuristic include the following.
(^|[^0-9a-z])(19|20|21)[0-9][0-9])([^0-9a-z]|$)
(^|[^0-9a-z])(Mon|Monday|Tue|Tues|Tuesday|Wed|Wednesday|Thu|Thur|Thurs|Thursday|Fri|Friday|Sat|Saturday|Sun)([^0-9a-z]|$)
(^|[^0-9a-z])(Jan|January|Feb|February|Mar|March|Apr|April|May|Jun|June|Jul|July|Aug|August|Sep|Sept|September|Oct|October|Nov|November|Dec|December)([^0-9a-z]|$)
(^|[^0-9a-z])(Today|Yesterday|Tomorrow)([^0-9a-z]|$)
(^|[^0-9])[AP]M|[AP][.]M[.]|Noon|Midnight)([^0-9a-z]|$)
(^|[^a-z])(0?[1-9])(:[0-5][0-9]){1,2}([^a-z]|$)

There should be others for time, hyphenated or slash delimited dates, or time zone.
The positions and normalized encoding of these date and time artifacts are then substituted into the artificial network inputs instead of the original text in the stream, reducing redundancy and improving both the speed of training and the resulting accuracy and reliability of recognition.
In the case of 2. above, the entire burden of recognition is left to the artificial network.  The advantage is less reliance on date and time conventions.  The disadvantage is a much larger burden placed on training data variety and training epochs, meaning a much higher burden on computing resources and the pacience of the stake holder for the project.
Windowing
An overlapping windowing strategy is necessary.  Unlike FFT spectral analysis in real time, the windowing must be rectangular, because the size of the window is the width of the input layer of the artificial network.  Experimenting with the normalization of input such that the encoding of text and data and time components entering the input layer could greatly vary the results in terms of training speed, recognition accuracy, reliability, and adaptability to varying statistical distributions of date and time instances and relationships.

If want to use deep learning approaches, you should look to recurrent neural networks (RNN). Recurrent networks will take into account temporal dependencies and could detect thatn this in this Friday belong to datetime but not in this apple.
As a simple model, you could create a model with a bidirectional LSTM layer (a type of RNN):

Input: the sequences of characters.
Output: whether the character belongs to datetime or not.

The longest part will gather many sentences with its corresponding solution to create a training/testing dataset. Keras might be a good framework to start playing around and with many examples.

Most RNNs for NLP use word embeddings as input feature. It would be challenging to design such embeddings involving numbers, hyphens or other punctuation. Maybe a character-level RNN is needed.

@DouglasDaseeco, the question didn't involve getting the value of the time. With the same structure, the output could be enriched to codify absolute (03/04/2018) and relative (this Friday) dates.

If you dont want to use machine learning you may use date time parser in python. Few examples are given below.  It will return you formatted date time from given string. It works with all languages.
>>> import dateparser
>>> dateparser.parse('12/12/12')
datetime.datetime(2012, 12, 12, 0, 0)
>>> dateparser.parse(u'Fri, 12 Dec 2014 10:55:50')
datetime.datetime(2014, 12, 12, 10, 55, 50)
>>> dateparser.parse(u'Martes 21 de Octubre de 2014')  # Spanish (Tuesday 21 October 2014)
datetime.datetime(2014, 10, 21, 0, 0)
>>> dateparser.parse(u'Le 11 Décembre 2014 à 09:00')  # French (11 December 2014 at 09:00)
datetime.datetime(2014, 12, 11, 9, 0)
>>> dateparser.parse(u'13 января 2015 г. в 13:34')  # Russian (13 January 2015 at 13:34)
datetime.datetime(2015, 1, 13, 13, 34)
>>> dateparser.parse(u'1 เดือนตุลาคม 2005, 1:00 AM')  # Thai (1 October 2005, 1:00 AM)
datetime.datetime(2005, 10, 1, 1, 0)

It was upvoted by user who was searching for it. Do you think you are a genius?


text:
How is G(z) related to x in GAN proof?
In the proofs for the original GAN paper, it is written:
$$∫_x p_{data}(x) \log D(x)dx+∫_zp(z)\log(1−D(G(z)))dz
=∫_xp_{data}(x)\log D(x)+p_G(x) \log(1−D(x))dx$$
I've seen some explanations asserting that the following equality is the key to understanding:
$$E_{z∼p_z(z)}log(1−D(G(z)))=E_{x∼p_G(x)}log(1−D(x))$$
which is a consequence of the LOTUS theorem and $x_g = g(z)$. Why is $x_g = g(z)$?

in all formulas shown you never showed $x_g$ or $g(z)$. What do these refer to and where?

It's not supposed to be derived from some equation. That is the basic premise under which GANs work. The output of the Generator $G(z)$ is fed as an input $x_g$ to the discriminator.


text:
Neural nets for novices
Stories like this one are quite popular these days.
The idea of training a neural net to do something silly like this may sound trivial to experts like you,  but for a novice like me it could be an interesting learning experience.
Is there novice-friendly software I could play with to train a neural net to do something like this or is there necessarily a steep learning curve?

You can take a look at PyTorch an open source deep learning platform which in my opinion is very easy to get started with, especially if you're familiar with programming in python.

An intuitive NN playground can be found in TensorFlow Playground
Also, check the Google ML crash course for coders as they promised to add more practicals.

keras is probably the highest level and easiest to go into.
Here are some keras tutorials


text:
Time leap (To achieve advance technology) using AI by simulating virtual world at a faster rate
How many decades are we far from achieving a virtual world just like our real world (or little graded down version) with AI. If in far future if we are able to achieve that (able to provide all the rules and manipulate all  huge amounts of data) will a time leap be possible. Assuming time in virtual world moves much faster, as the computation rate is very high.So few hours of computation in real world will be years in the virtual world. So if we run the virtual world for few days and attain data from its final stage, will we get some future technology in our hand?
This concept of virtual world was put by me, assuming such powerful AI wont be integrated directly to our world without isolation tests.
I was thinking about P and NP  problems, fermi paradox, path which will be taken by future AI and time leap and somehow reached to this question.

Fermi paradox (Assuming this world is also a virtual world created by much smarter species- which explains the isolation to a bit.)
Assuming that's the case wont nesting of virtual world put pressure on the  root system(most outermost system) running virtual world.

I know its weird, but was curious.
So the final question is .. the whole above stuff is a concept.. how much of reality of AI and its future can be compared with this concept.

You might find the following relevant: https://en.wikipedia.org/wiki/Limits_of_computation

@k.c. very nice link!  I wasn't thinking about blackholes and entropy, so thanks for posting.  I've attempted a formal answer, in which I've noted and acknowledged your link.

This is a fun and instructive question, so I'm going to attempt an adequate answer.
Q: How many decades are we far from achieving a virtual world just like our real world?
Nobody knows, although it's popular to use 2050, a number they came up with, I believe, based on some form of Moore's Law.  But they're just guessing, and nobody knows if they type of singularity proposed is even possible.  We still don't understand how the human brain works, or if strong Artificial General Intelligence is even possible.  (I personally think it definitely is, but am skeptical of the optimistic predictions in terms of when.  There is a wide spectrum of opinions on the matter.)
Time Leap
It seems to me that in modeling, for instance, the entire planet in this manner, the simulation is going to use all kinds of abstraction (as opposed to modeling every atom and sub-atomic state.) For that reason, I'd think any simulation would only approximate reality, and not be 100% accurate predictively. My guess is you'd have to run a very high number of such simulations, then statistically determine which outcome would be most likely based on a set of outcomes, but the more you narrowed that to a single result, the lower the accuracy.
I've been thinking about Conway's Game of Life in relation to Laplace's Demon lately. Perhaps Game of Life would provide some insight. I think part of the problem there is that there is still a hard limit to the speed of information in the system (which can be analogous to the hard limit of c in the "real" world.)  Game of Life is a deterministic with a single node for each ply of the (predictive) game tree. Predicting the outcome of a novel, non-trivial starting configuration is indistinguishable from running the simulation.  But the only entity that has perfect information in regards to the entire system is the system itself. It's possible that an intelligent construct within Game of Life could model outcomes of local phenomena, but perfect information on the entire system is an impossibility, and as with quantum phenomena, trading of information actually affects the system. (See glider guns.)
@k.c. posted a very useful link on the Limits of Computation, which is probably a much less convoluted approach to the question;)
But the problem you propose is deeper because we still don't even know if there is true randomness is nature (quantum phenomenon) or if indeterminacy, and the probabilities that arise out of it, are merely functions of the limits of observations, which is well defined in the mathematics, but also has a philosophical component.
Quantum phenomena don't directly affect the macro world, but can bleed into it in areas such as formation of crystalline structures.
So until we can solve the randomness question, and find some way around the observational problems at the quantum level, I don't think we could model the type of systems you're asking about with perfect accuracy.

Further Reading:
I strongly advise you take a look at the Quantum Thief trilogy by Hannu Rajaneimi.  I always recommend these books for interesting questions such as this, not simply because Rananeimi deeply explores the type of post-Singularity world you're thinking about, but because he's a mathematical physicist, and his grasp of the mathematics involved, including quantum theory, is far superior to mine and almost certainly other authors of speculative fiction, whether literary or under the moniker of "futurists".
His take is that even with all of the computing power you envision, at a level of technology where matter and information are interchangeable, perfectly accurate prediction of the future is not possible.
But it is this next part you may find interesting:

Rajaneimi inverts your concept of the "Time Leap" by instead talking about the "Deep Time"

The Deep Time refers to what a consciousness can experience at peak processor speeds.  For instance, thousands years can be experienced in mere moments of organic human time.
I'm not going to give a spoiler on what happens at the end of the trilogy, but it involves the topology of black holes.

final few questions to wrap things up.. assuming that the above concept is achieved .. Will the rate of technological advancement from that point in time increase by a huge amount (experiment success probability)? Will it be necessary to keep track and store data on the past of the virtual world... as things can mutate and can be different in final stage..

@Azi I doubt anyone can say.  Our understanding of the universe is still quite limited.  With this model, you're mainly talking about processing power (analytics).  There remains the observational problem, and the ability to observe is a critical element in creating experiments.


text:
Is AI entirely a part of Computer Science?
Both AI and Computer Science are Sciences, as I understood from Wikipedia, Computer Science is everything that has any relation to computers. And AI is commonly defined as

Study of machines that take the prerogative of humans (creating musical pieces e.t.c

But recently, when I was reading, I read this sentence : "In Computer Science, AI is [...]"
So my question is really : Is there a part of AI studies that do not refer to Computer Science?

I would say it is, in the sense that all of the related fields @Karan touchs on are approached through the lens of computing (i.e. without technology to run sophisticated algorithms, you cannot have artificial intelligence, thus the study of psychology as related to AI is toward the end of reproducing psychological mechanism in a computing medium.)  Regardless, Karan's answer is quite correct.

@DukeZhou ,lets have a glimpse on generations in computing or computers.Artificial Intelligence is a general characteristics of Computers in Fifth Generation.One is trying to create a distinction between AI and Computer Science.There's no part of AI that does not refer to computer science.AI is here to describe the fundamental characters of fifth generation of computers...and if I say computers it's not only devices but cyborgs or Non-biological beings.

@DukeZhou totally agreed, there are other fields like psychology which would play major role as we approach Singularity

AI is an amalgamation of many fields, Computer Science plays a major role in imparting "Intelligence" to the machine. Following is a quote from the best selling AI book Artificial Intelligence: A Modern Approach by
Stuart J. Russell and Peter Norvig.

Artificial Intelligence (AI) is a big field, and this is a big book.
We have tried to explore the full breadth of the field, which
encompasses logic, probability, and continuous mathematics;
perception, reasoning, learning, and action; and everything from
microelectronic devices to robotic planetary explorers.

So, the answer to your question is yes, there are other fields that AI depends including mathematics (to optimize AI algorithms), electronic components (sensors, microprocessors, etc.), mechanical actuators (hydraulic, pneumatic, electric, etc.)
I highly recommend the book if you are looking for a starting point.

Was going to quote exactly that paragraph, so have my up vote

@Keno ,you up-vote the answer and you don't up-vote the question.Can those who up-vote the answers tell us whether the question doesn't fit or this is how the community is all about.

As @Adam893 points out, not all AI systems are electronic, so electronics isn't necessary for AI.  Also, since AI systems aren't necessarily robots, as Heinlein demonstrates in The Moon Is A Harsh Mistress, creating an AI is not dependent on mechanical components.  Definitely a +1 for mathematics, though!

It depends on your perspective. As a roboticist, I view A.I. as a discipline within Robotics, which itself is a discipline of Computer Science. The difficulty in definitively labelling these fields is partly due to the massive amounts of overlap. Take robotics for example, which combines the most advanced elements of mathematics, mechanical engineering, electronics, philosophy, neurology and many more. Do bear in mind that artificial intelligence need not be hosted on silicon (i.e. computer chips), it is entirely possible to have biological artificial intelligences, 'running' on living material. Look at the works of Professor Larry Bull from the University of the West of England (my university professor):
Bull, L. and Uroukov, I. (2008) Towards neuronal computing: simple creation of two logic functions in 3D cell cultures using multi-electrode arrays. International Journal of Unconventional Computing, 4 (2). pp. 143-154. ISSN 1548-7199 Available from: http://eprints.uwe.ac.uk/20720
They where able to demonstrate the logic functions AND and OR using living neurons, harvested from chickens. This type of A.I. research is so different from conventional computer science that it cannot be labelled under the same field

Robotics may benefit from AI, but AI is not dependent on robotics - see, e.g., Heinlein's The Moon Is A Harsh Mistress for an AI that isn't a robot.  +1 for mentioning biological AI, though.