How can i make a self learning and evolving programme using C++? | Sololearn: Learn to code for FREE!

+1

How can i make a self learning and evolving programme using C++?

I want to create a programe that learns to drive a bike or a car in a game using C++. i cannot find suitable article on the internet that can help me. Kindly help me if you can. Thank You.

11/6/2020 5:00:19 PM

Ved Munj

10 Answers

New Answer

+7

It doesn't matter what language the original poster asks a question about. If it mentions AI or ML the Pythonistas never miss an opportunity to promote their favourite language.

+4

Mahmoud 'Carbon' Saghraoui You mind expanding on why you recommend using Python for creating "a 'self learning' program"? In what capacity is Python always the recommended language for writing something so complex and involved?

+2

So you want to do on your own what Elon Musk and Tesla are still having problems getting right.

+2

@Mahmoud 'Carbon' Saghraoui While this could be regarded as hijacking the thread let me address your Pythonista propaganda. 1. Powerfull libraries, many of which are written in C/C++. Some of which are merely python wrappers around existing C libraries. TKinter is a classic example. It was originally written for use with the tcl scripting language. 2. Versitility in every field. Nope. Try writing an operating system in Python. How about device drivers, high performance software, software for resource constrained embedded systems? 3. High performance and wide community support. Python is acscripting language. The only performance you grt from it is due to the libraries written in C/C++. I don't consider a circle jerk echo chamber wide community support. Every major programming language has a wide support, it's called the Internet. 4. Easy to learn, understand and elasticity. All high level languages are easy to learn and understand. I have no idea what elasticity is in software, but I've only been writing it since the 80s. Must be a zoomer term. 5. Cross platform, So are many other languages at the source code level. There are python libraries that are only available for certain platforms though. 6. Less lines of code. That's debateable. To provide features such as type safety and to sanitise data it is necessary to write far more code in python to achieve what is enforced by other languages. And finally. Python is it's own meme. It was written over a holiday and named after a bunch of commedians and a snake that strangles it's prey. It's a scripting language like so many others. An extremely vociferous unproductive fan base makes a lot of noise about python. So my question to them is "Where are the mainstream products?". That is the only measure of a language's success.

+1

Mahmoud 'Carbon' Saghraoui Thanks for the response. I'm assuming the OP is aware of the general recommendation for Python, but really wants to figure out how to approach this with C++. I was hoping for some new insight based on first hand experience rather than an echo of the typical sound bites from articles - often written for beginners, by non developers - targeting people in data sciences, rather than software engineering. Python as a glue language certainly makes ML modeling accessible to those who aren't also experienced software engineers already proficient in other languages like C++. But, there is still a need for the short supply of those who can implement models and new algorithms in C++. It's also not unheard of for models to be prototyped, tested, and validated using Python, then converted to C++. It just depends on the use case and team available. Hopefully this makes sense in the context of this question. 😉👌

+1

Ved Munj It's unclear if you already have ML experience or not. Assuming you don't... so... I'm recommending these articles and video links. Hopefully, they will help get you started. Excellent video from 2015 to give you understanding of NEAT (Neuro Evolution of Augmented Topologies) for learning to play Super Mario. Definitely search for more information on this. https://youtu.be/qv6UVOQ0F44 ML C++ Specific Articles: https://www.analyticsvidhya.com/blog/2020/05/introduction-machine-learning-libraries-c/ https://lmemsm.dreamwidth.org/16168.html https://analyticsindiamag.com/top-10-libraries-in-c-c-for-machine-learning/ https://towardsdatascience.com/practical-machine-learning-with-c-and-grt-a54857972434 6 Part C++ ML Tutorial Series: https://www.youtube.com/playlist?list=PL79n_WS-sPHKklEvOLiM1K94oJBsGnz71 Also, you might want to check out this course starting Nov 9th: https://www.coursera.org/learn/machine-learning

0

if want scripting language maybe C# could suit your needs If want more performance, C/C++ or Rust may be the choice

0

I happen to come across this video as well. Both the short video and comments are consistent with my reply to Mahmoud 'Carbon' Saghraoui. https://youtu.be/zzNW9ZXU434 Hope this is useful. 😉👌

-1

David Carroll, The user's question already contains an error, there is a difference between AI and Machine Learning. " I want to create a programe that learns to drive a bike or a car in a game using C++ " that's machine learning, and Python is known to be the best language for machine learning proven in a large number of articles. Here is why Python is better than C++. POWERFUL LIBRARIES: Why is this because Python having lot of libraries which are more powerful than anything and mostly written in C language which is predecessor of C++. VERSATILITY IN EVERY FIELD: So we don't have to take care of performance and the speed for the time complexity. Also Python is the language which is getting widely used to only for machine learning, artificial intelligence, Natural Language Processing neural network as well as data mining. These are the some of many areas which made the Python hero of today. HIGH PERFORMANCE & WIDE COMMUNITY SUPPORT: You can found built-in libraries for most of the artificial intelligence or any other fields methods which are developed by the worldwide developers of the Python community. They are highly efficient and can handle millions of millions records or you can say dataframes in Python. Why we should choose the Python over C++, EASY TO LEARN, UNDERSTAND & ELASTICITY: Because it is because it is easy to use it is very simple and having very very elastic structure that can be stretched to any levels. CROSS PLATFORM: Also every python code is cross platform which mean it can run on any platform like Windows, Linux, Macintosh or any other platforms which you like to use. LESS LINES OF CODE: Everyone knows Python takes very less number of lines to code anything. Famous “hello world” program can be written in a single line. And finally this: https://www.netguru.com/blog/cpp-vs-python#:~:text=In%20this%20sense%2C%20Python%20comes,without%20having%20to%20implement%20them.

-4

If you want to make a 'self learning' program (artificial intelligence) then use Python instead of C++.