artificial-intelligence

Algorithm: shortest path between all points

馋奶兔 提交于 2019-12-18 19:07:08
问题 Suppose I have 10 points. I know the distance between each point. I need to find the shortest possible route passing through all points. I have tried a couple of algorithms (Dijkstra, Floyd Warshall,...) and they all give me the shortest path between start and end, but they don't make a route with all points on it. Permutations work fine, but they are too resource-expensive. What algorithms can you advise me to look into for this problem? Or is there a documented way to do this with the above

How do you get Python to write down the code of a function it has in memory?

家住魔仙堡 提交于 2019-12-18 16:58:23
问题 When I pass the options in the program (a computational biology experiment) I usually pass them through a .py file. So I have this .py file that reads like: starting_length=9 starting_cell_size=1000 LengthofExperiments=5000000 Then I execute the file and get the data. Since the program is all on my machine and no one else has access to it, it is secure in a trivial way. I can also write a similar file very easily: def writeoptions(directory): options="" options+="starting_length=%s%s"%

RDF representation of sentences

纵饮孤独 提交于 2019-12-18 13:40:53
问题 I need to represent sentences in RDF format. In other words "John likes coke" would be automatically represented as: Subject : John Predicate : Likes Object : Coke Does anyone know where I should start? Are there any programs which can do this automatically or would I need to do everything from scratch? 回答1: It looks like you want the typed dependencies of a sentence, e.g. for John likes coke : nsubj(likes-2, John-1) dobj(likes-2, coke-3) I'm not aware of any dependency parser that directly

Locating Text within image

元气小坏坏 提交于 2019-12-18 12:09:22
问题 I am currently working on a project and my goal is to locate text in an image. OCR'ing the text is not my intention as of yet. I want to basically obtain the bounds of text within an image. I am using the AForge.Net imaging component for manipulation. Any assistance in some sense or another? Update 2/5/09: I've since went along another route in my project. However I did attempt to obtain text using MODI (Microsoft Office Document Imaging). It allows you to OCR an image and pull text from it

How can I apply multithreading to the backpropagation neural network training?

与世无争的帅哥 提交于 2019-12-18 11:56:43
问题 For my university project I am creating a neural network that can classify the likelihood that a credit card transaction is fraudulent or not. I am training with backpropagation. I am writing this in Java. I would like to apply multithreading, because my computer is a quad-core i7. It bugs me to spend hours training and see most of my cores idle. But how would I apply multithreading to backpropagation? Backprop works by adjusting the errors backwards through the network. One layer must be

What's differential evolution and how does it compare to a genetic algorithm?

北战南征 提交于 2019-12-18 11:53:51
问题 From what I've read so far they seem very similar. Differential evolution uses floating point numbers instead, and the solutions are called vectors? I'm not quite sure what that means. If someone could provide an overview with a little bit about the advantages and disadvantages of both. 回答1: Well, both genetic algorithms and differential evolution are examples of evolutionary computation. Genetic algorithms keep pretty closely to the metaphor of genetic reproduction. Even the language is

Are evolutionary algorithms and neural networks used in the same domains?

浪子不回头ぞ 提交于 2019-12-18 11:21:49
问题 I am trying to get a feel for the difference between the various classes of machine-learning algorithms. I understand that the implementations of evolutionary algorithms are quite different from the implementations of neural networks. However, they both seem to be geared at determining a correlation between inputs and outputs from a potentially noisy set of training/historical data. From a qualitative perspective, are there problem domains that are better targets for neural networks as

Programming Technique: How to create a simple card game

牧云@^-^@ 提交于 2019-12-18 10:31:00
问题 as I am learning the Ruby language, I am getting closer to actual programming. I was thinking of creating a simple card game. My question isn't Ruby oriented, but I do know want to learn how to solve this problem with a genuine OOP approach. In my card game, I want to have four players, using a standard deck with 52 cards, no jokers/wildcards. In the game, I won't use the ace as a dual card, it is always the highest card. So, the programming problems I wonder about are the following: How can

Programming Technique: How to create a simple card game

拜拜、爱过 提交于 2019-12-18 10:30:10
问题 as I am learning the Ruby language, I am getting closer to actual programming. I was thinking of creating a simple card game. My question isn't Ruby oriented, but I do know want to learn how to solve this problem with a genuine OOP approach. In my card game, I want to have four players, using a standard deck with 52 cards, no jokers/wildcards. In the game, I won't use the ace as a dual card, it is always the highest card. So, the programming problems I wonder about are the following: How can

Multithreaded backpropagation

拥有回忆 提交于 2019-12-18 09:35:18
问题 I have written a back propagation class in VB.NET -it works well- and I'm using it in a C# artificial intelligence project. But I have a AMD Phenom X3 at home and a Intel i5 at school. and my neural network is not multi-threaded. How to convert that back propagation class to a multithreaded algorithm? or how to use GPGPU programming in it? or should I use any third party libraries that have a multithreaded back propagation neural network? 回答1: JeffHeaton has recommend that you use resilient