d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > I Want To Work In Artificial Intelligence
Add Reply New Topic New Poll
Retired Moderator
Posts: 115,437
Joined: Jan 19 2007
Gold: 35,078.94
Trader: Trusted
Apr 29 2016 12:49pm
If I wanted to learn to work in AI, what languages should I learn? Python? R?

Anyone involved in this? I'm an MBA grad working in sales/finance now and i'm so bored of it. I'd rather do something that changes something for good in the world and to do something I can create. I dont feel fulfilled selling software to businesses so they can speed up their processes by a few seconds. I love working in the stock market, but at this point in life, the bull market is dead and the only gains seen will be by people who have programmed algorithms that buy a stock at certain points and sell stocks at certain points that the human mind simply can't keep up with/compete with.

Does anyone work in AI? I'm serious about this.

Thanks
Member
Posts: 28,134
Joined: Nov 13 2006
Gold: 84.38
Apr 29 2016 02:34pm
"Python is very widely used for Artificial Intelligence. "

https://en.wikipedia.org/wiki/List_of_programming_languages_for_artificial_intelligence

What the fuck is R?
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 29 2016 05:20pm
Any language can be used for AI because AI is such a large field.

If you are looking at neural networks I suggest a language which has support for the already existing networks like Tensorflow that also has the ability to use a GPU as a way to process data.

You best bet is to look into using compiled languages for the task such as C, C++, Crystal, Cython (i think), and maybe a few others. Simply by choosing a compiled language you will see an increase in speed/performance over an interpreted language.
Member
Posts: 28,134
Joined: Nov 13 2006
Gold: 84.38
Apr 29 2016 09:37pm
Quote (AbDuCt @ Apr 29 2016 05:20pm)
Simply by choosing a compiled language you will see an increase in speed/performance over an interpreted language.


This was my initial thought too but then reading it seemed like a lot of people use interpreted languages as well.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 29 2016 11:43pm
Quote (bit @ Apr 29 2016 11:37pm)
This was my initial thought too but then reading it seemed like a lot of people use interpreted languages as well.


As I said it depends on the AI.

I wouldn't dare run a huge data set through a neural network in python. NLP and n-gram creation for AI auto correction? Sure no problem.
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Apr 30 2016 09:25pm
it's not really python "or" R, it's python "And" R using r to preform your large scale data analytics and python to preform your algorithms, make your trades, etc
you can't do this program with R alone, and if you have some criteria for pulling in data you don't really need it. R is more for crunching big data to derive statistical information, which you don't really need to do for this.
what's more important i think is your ability to write concurrent programming which is what Go was built for

i imagine multiple threads running, take in the data for the 3k unowned tickers, run the datasets against your methodology, fire off buy events, and then for the list you own constantly calculate sell points based on methodology for that, check the price = sellpoint and fire off sell events

Go's use of channels and goroutines would fit this sort of schema perfectly, and although it could be done with many programming languages i think it would work exceptionally well with go

as far as learning a first programming language, for that i don't recomend go, it's strict alot of functionality you get free of charge with a language like python you have to write yourself. I wouldnt recomend python either because it's slow with threading, i think java would be a better bet. but that might just be my personal bias because i actually use java and c#.

e. on a side note i wrote a similar java program a few months ago that pulls a bunch of p/s info from yahoo finance runs for each ticker, runs a basic keneth fisher methodology and prints the tickers that passed but there are too many situational details that i have to consider myself when deciding if i want to buy and at what point i want to sell. the program takes quite a while to run on my computer.

This post was edited by Ideophobe on Apr 30 2016 09:48pm
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Apr 30 2016 10:15pm
If you need concurrency with fibers (context switching flow control) such as what is implemented in GO, I suggest Libmill in C, or crystal.

Both offer channels and context switching concurrency and arguably are better at it than GO.

Crystal plays off the Ruby syntax so it is easy to pick up, and Libmill is well documented with plenty of examples. Libmill even offers wrappers around Unix, TCP, and UDP sockets for use in concurrent events.

Be wary though that concurrency is not parallelism. In a concurrent environment only one action is happening at a given time and via context switching and virtual stacks it appears multiple events are happening at once. Concurrency is a lightweight threading which best performs when you are dealing with heavy IO in which one concurrent task can hand processing time over to another while its IO is blocked.

Threading on the other hand does not behave like this and performs tasks in parallel where each task is running side by side with each other. Threads are more expensive to create and destroy so you will have to plan how to use them wisely.

Which brings me to the last point. I don't believe python supports real threads, but rather concurrency under a GIL (single thread). Likewise with Ruby (MIR interpreter, JRuby can spawn Java threads) and Crystal. This can heavily effect performance since tasks can not be ran in parallel. On another note if you use these scripting languages on Linux you can use the Fork() method to spawn another process to add parallelism, although you will likely need to use Unix Pipes to communicate effectively between processes.

This is where C could come in handy since it can spawn native threads on the host OS. Although you will likely have to find a proven library to manage your threads and create pipes between them because that can be difficult to get right.

This post was edited by AbDuCt on Apr 30 2016 10:17pm
Member
Posts: 1,995
Joined: Jun 28 2006
Gold: 7.41
May 1 2016 01:11am
What do you mean by "work in AI." Because no one "works" in AI, since AI doesn't exist yet. The field is theoretical. We have yet to create AI. "Working" in AI consists of research teams at university and such. There are products in the market which incorporate our best efforts at AI algorithms, but these are still procedural in nature. So what exactly are you asking for?


Lisp is king.
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
May 1 2016 01:50am
idk go's concurrency is pretty good, and i find the channels to be very intuitive, but tbh i'm not qualified to make any real comparison, all i can tell you is that is what go was designed for. While you are right that go cannot run multiple threads in parallel from the same physical processor, it still can make use of multiple physical processors to achieve parallelism. i'm not sure if implementing logical processors can really achieve efficient parallelism anyway, again i'm just not qualified to speculate.

C would probably run faster than java since it's lower level idk but i think java would be easier to learn. I don't know c, so i am just speculating but from what i've heard java's easier to learn. All i know for sure is that there are tons of libraries already out there to do alot of what you need to and of course parallel capabilities with fork/join methods with thread safe datatypes in java.

in any case recomendation for java, or c# still sounds like the best bet to me but that might be personal bias.

This post was edited by Ideophobe on May 1 2016 02:03am
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll