chatbot with artificial intelligence - artificial-intelligence

I am new to programming and would like to create a chatbot(I know a little about arithmetic, statistic, linear algebra but no knowledge yet in ML/DL/AI theory. And as I'm starting, I haven't done any projects yet. But the final goal I set myself is to be able to create a chatbot with artificial intelligence. But after some research, I saw that it will take me quite a long time.
So I set myself an intermediate level. One just to create a chatbot that can send and reply to messages automatically. To this end, the programming languages ​​that have been recommended to me are: Python, Ruby, PhP, Java... but (in view of my final objective : creating a chatbot with AI) I would like to know which programming language will be more useful and more appropriate for me?
[RE]: Given my situation, I haven't started a project yet (I'm looking for the right language to be able to get started). Yes, I know I'm repeating myself but that's why I can't present a community-specific problem. Besides since I just learned that my question is a matter of opinion and that it does not respect the rules of the platform, I humbly ask the moderators to remove it.
Thanks !

Hey that’s an interesting project to do.
As you are more focused on the artificial intelligence I would stick with the biggest and most common ML language:
Python - this is currently the biggest Machine Learning language and allows you to use open source tensorflow for your ML models.
I think what you will find interesting and challenging, once you go into more complex sentences is dealing with natural language processing, Python has the nltk (Natural Language Toolkit) that’s a good place to start and learn from.
Once you have gotten a possible basic python console chat system working you might want to show it off in a nicer presented way so more so you could wrap it in a simple python api and call upon it using a small JavaScript web browser chat application. Although your more interested in the first part so I’d suggest go with python.
I’d start off by trying to make the ai respond to predefined strings and then go from there. It’s worth nothing there is a number of open-source GitHub projects that have ML and Natural Language Processing bots so have a little look around for inspiration. https://github.com/topics/chatbot
Also fyi if your writing a report on this doing detailed investigative work in what tooling and language to use is an important part of your report and you should gather information and sources about usage etc and then reason as to why.
Hope this points you in the correct direction and good luck 👍

Related

MS SQL and my need for a little direction [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I've been lurking around for several weeks and have been totally blown away by the amount of information and how the community quickly responds. I have noticed that questions like this typically receive sarcastic remarks and sometimes get down voted. Please bear with me as I attempt my first post :)
I little background..
I work at a tiny software company as the "QA department". Our application has a MS SQL back to store customer data and short term loan information for financial service companies. I started working here 6 years ago as a gernal technician to provide support for their call center, so I've been overly exposed to SQL and have become fairly familiar with working with it. You probably wouldn't pay me to develop a enterprise level database, but at this point I've become familiar enough to do most things in SQL.
Why I'm asking my question..
I want to develop an application to store and track our software issues and new dev. I've done research on this website along with asking around and I still feel sort of lost as to which direction I should take. I want the core of the application to be pretty basic at first, to provide various screens between my entities/modules and to create reports to show their various relationships. In the future I want it to be more complex, to provide a web portal of some sort and to start getting into various complex QA software concepts. I've read around and it sounds like I might want some variation of C/VB for the windows portion, but all of the topics have sort of overwhelmed me. Do I want to start with a more basic one that was created 20 or 30 years ago? (I think that's C and C++, right?) or a more recent one like C#? Will I be able to develop a web portal with both of these? (by web portal I'm thinking it would provide access to our database of defects and have username/password sign-in). I've seen that the various .NET languages lean more towards web development, should I start with one of these?
I am at the very beginning of this and I fully understand that I'm jumping into some deep waters here. I want to make sure I don't end up spinning my wheels and that I focus my energy on something that won't end up being a bad idea in 1 or 2 years after I start. So far I've found this website very helpful, if I can pick a direction I know I won't have any problems finding what the next step is. It might help to know that I have no formal or informal programming background (if it wasn't obvious). I'm a 27yo techie who is starting his first venture into programming, go easy on me! Thanks for taking the time to read this :)
I won't recommend that you go to C, C++, or VB. C and C++ are used mainly for developement of system software, compilers, etc. VB is deprecated by now; there is a .net version VB.NET, but my preference is C#.
Looks like you are a Microsoft shop. Steer youself towards using C#. Visual Studio provides great support for development of Web Applications with support for holding state in entities backed by MS SQL.
I would start with a simple example as given in MSDN http://msdn.microsoft.com/en-us/library/dd410597.aspx.
This example uses an Model View Controller based framework that is fairly easy to configure and use. They have great examples.
There is a free framework that also supports MS SQL Entity store http://www.coderun.com/ide/
Enjoy
Don't write a line of code. There are literally hundreds of open source and commercial software packages that already do what you want to do. You'd be better of spending time researching them and finding the package that most closely meets your requirements. A good solution will also be extensible enough that you'll be able to modify it to meet all of your requirements.
Since you work for a small company I can guarantee you that using your limited development hours "writing your own" will be counterproductive. You'd be better off adopting something off the shelf and becoming proficient at it. You'll learn more about developing systems like this once you've become intimately familiar with one of them.
Check out JIRA or
http://en.wikipedia.org/wiki/Comparison_of_issue_tracking_systems for some other ideas.
For the benefit of your company I would recommend to use an existing
solution. But if you want to learn and build something of your own, I
would suggest that you check out some popular web application
frameworks, like:
Django
Ruby On Rails
Zend
Good Luck with your project!
Given that your intent is to learn and create something yourself I think you should consider a LAMP stack and PHP with one of the PHP frameworks on top (Cake PHP, code-igniter or the like).
The C++ route is a long hard way (C++ is my language of choice) to learn; as a learning experience I think you will get quicker and more satisfying results with PHP.
I also think that this is a realistic project for someone of your skills over a period of a 6 to 12 months - start with a simple requirement and then build it up to have all the features you need.
If you just want a bug tracking system obviously there are many options that won't demand any development.
How much experience do you have with things like installing Linux, Apache, Mysql, etc? If you are completely new to this, then this will be a much tougher task, because there are many layers you'll have to learn before you can even get to the point of writing an end-to-end application.
I would avoid C/C++/C# because there are a lot of things you would need to learn about basic programming before you even got to the stage where you could make database calls.
On the assumption that you don't have experience with LAMP (Linux/Apache/Mysql/(Perl/Python/PHP)), my suggestion would be to start simply, by using a scripting language like Python or Perl. You can very easily get a database connection, and start writing queries, and extracting data from there. If you are used to Windows, I would install ActivePerl or ActivePython, and start from there. You can start building a command line program that does what you want, and then from there, you can move on to creating a web application that can do something similar.
Building a web application would likely be much easier than writing a Windows application, so after you have gotten comfortable with the scripting language, that's the direction I would go afterwards.
Good luck!

MUD Programming language

I have been playing a MUD game now off and on for over a year. I have scoured the internet looking for the best computer language to learn to develop my own. So far, I have come up with nothing but C. Is C the best language to learn for this application, or is there something better?
I know SMAUG was written in C, but that was years ago. I am new to programming in general and have some experience with Python. I have been playing Aardwolf, which allows it users (after a certain level) to create their own area's. The user does this using Lua. This was interesting to me, because Lua is a "scripting" language. So this begs another question - Do you build the game's format in C (or something else) but create the world with a script?
Also, this would be a game with only my friends, so a direct connection would be required since I would not be hosting it online. So, once again, I would like to dive into this world and use this as a pet project to also help me learn a programming language... but which one would be the best that would also allow me to scale it uo in the funture
P.S. - Any open source code out there that I can look at and study?
So, once again, I would like to dive into this world and use this as a pet project to also help me learn a programming language... but which one would be the best that would also allow me to scale it uo in the future
Most MUD codebases tend to be in C, but this is mainly for historical reasons. MUDs were fairly popular a while back, and at the time, C was by far the best language for portability which was supported by most hosting options out there.
That being said, a MUD is really fairly simple, in many ways. You could easily write a MUD in any language, provided it supports sockets and text parsing. Using a language with a good string parsing and high level socket support would actually be far simpler than some of the classic MUD code bases.
There are a ton of available MUD engines available online : a quick look at MudConnector will give you a ton info of available servers, software and code bases.
As for your programming language of choice, if you intend on only making it available to you and your friends, Python would be fine - I made one entirely in Lua a few years ago and it was a breeze. It's a great learning experience !
perhaps you should look for a MUDOS
http://www.mudos.org/

2D game development basics

I would like to write some simple Mario-like game from scratch using language C. But honestly I have no idea how to do so, and I can´t find any good tutorial for this, which is for free.
But to the actuall question, I have only written WinAPI programs so far, so all event handling and user input was handled by OS, with minimum work, But to develope game, with for example menus with non-rectangular buttons, animations, and so, I guess, there is no such thing in WinAPI taht could help me with this more than just some basic routines mouse pointer location and keypresses.
So, is the right way to write your game to write entire draw part of game engine by manipulating objects for player, enemies, and even background yourself, and than just use directdraw for output to screen?
EDIT:
I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
A good approach to this would be to have a look at the SDL library. I'm not saying it's necessarily the best library for 2D games, but it's easy to get started with and the web is flooded with tutorials and open source code samples for simple homebrew 2D games written using SDL.
I do recommand the SDL too, but you should definitely have a look on lazyfoo tutorial, which is just great.
When I started programming I started doing it with Allegro, back in the good old DOS days. It was the first usable library which worked with SVGA libraries, and had a good sprite support. Then version3 came and they added support for windows (using GDI and Directy X, you could choose at runtime which engine to use). The linux port came to life, and all is good.
It's a very basic 2D library, and it will teach you the very basics of graphics and animations. Now it even contains audio support which is a very needed addition (well, I still remember V 2.9X...). They are in betas for version 5, and I think this is an interesting project for you to look into.
http://www.talula.demon.co.uk/allegro/
What are you guys talking about, the WinAPI has low level drawing routines.
Although using an established library like SDL is probably a better idea you could create your own abstractions to the WinAPI drawing routines without too much difficulty.
Then it's just a matter of creating the while loop that has all the drawing instructions and interpreting input. For 2D games this isn't too difficult.
I also used SDL, but try to look at HGE. It requires at least DirectX 8.0 so your applications will work only on Windows but on their forum you will find many topics on how to port it to OpenGL. In my opinion HGE will be easier to learn than SDL, because SDL is a low level library and you will have to learn how to handle many things by yourself. HGE is more ready to start just out of the box.
In short, yes - there's nothing in the WinAPI that will help you much. However, there are dozens of game engines that you could build your game on that would take a huge amount of gruntwork out of creating the game itself. A bit of Googling will help you.
(Personal recommendation: although it's technically a 3D engine, something like Unity is an excellent engine that includes tutorials for creating 2D games. Unity isn't C, but it does make your life a lot easier...)
EDIT: I actually want to learn how to write games from scratch, becouse it must be great programming experience, and if you consider games like Commander Keen on DOS, created with no framework or libraries, but still so great.
This is actually not quite right. Commander Keen (and any DOS games) do use libraries: the ones provided by DOS, BIOS, etc. Without libraries of one form or another, you wouldn't be able to do anything useful with C. For game programming, you really do want to leave all the low level details to someone else.
I'd recommend Allegro as a beginning game programming library.
Check out this one Game dev starting
They have realy a big resource related to game programming and a lot of beginner stuff. SDL is good, but you should consider about learning basic game techniques before start coding and even before start thinking about the api/libs you use.
Clear out how much "intelligence" you need (Ki), consider about loading/Saving a an early time, ... so much things that you should keep in mind if you want to finish your project.
Do you need a game editor? (Also..work) What about sound/graphics? Writing all this stuff on your own will take a lot of time (if you do not have experience). Creating the content is another big issue which can consume a lot of time, if you make it at all.
Maybe it will help you to have a look on some dev kids, because that will give you the idea how their engine works. Like this one (outdated) Dev kid
I've just started a similar project a few days ago, you can check it out over at GitHub.
It should give you some ideas about how the game is structured. As well as some details on a scrolling 2D map with collision (which turns out to be quite complicated if you want to get it 100% bug free). Oh, and it's using SDL as many here have already suggested.
As for me, this is my first C project. But I'll have to admit that I've done similar stuff in Java and Python before, so this was a good way for me to quickly learn C. And since it's learning and not any productive stuff, I'm using plain C99, which makes the task even "funnier".
But back to the game, you really need to think about your design before you start coding, write it down on a sheet of paper, or if you're like me and you don't have tree stuff in reach write it in pseudocode.
Think about as many possible game states as you can, nothing's worse than having to re-implement the whole player/map/whatever stuff from scratch just because you did not think about feature XYZ before.
Design is very important, if you don't have a goal to begin with, your project will reach a point where it fails, just like my Tuff did, well it also failed due to missing music and somebody who would have designed enemies, etc.
Speaking of graphics and such, bear in mind that the game will consist of much more than just the plain code. If you aren't good in graphics then take that into account while designing. Because you will quickly lose your motivation when the only things on the screen are colored rectangles.
Action Arcade Adventure Set (originally published as a book) is probably one of the most complete tutorials on how to write a 2D side-scrolling game. Although an older reference, many fundamentals for developing a 2D side-scroller have not changed.
Full source code examples and some tools to develop a side-scroller are provided as downloads. There is only one external library used to handle graphics primitives. As this is an older DOS program, you may have to use a DOS emulator like DOSBox or modify the examples for more modern environments.
I suggest you skim chapters 1 to 9 and focus on chapters 10 to 17.

What is better CakePHP or pure PHP for a huge Project?

I just know pure PHP, never worked with a framework before, but my boss wants me to create our next project, which will be a lot bigger than everything we did before (means bigger than a page that needs only 5 scripts to work, more like 100 or something like that).
But I'm not sure if I can realise it with pure PHP, now I heard that CakePHP could be helpful for that (structure etc.).
Should I learn this or just use my pure PHP way?
As noted, your definition of the scope and complexity of this project is a little vague, but I'll respond with the general observation that larger projects benefit from more "top-down" structure than smaller ones. I suspect that pretty much every PHP developer on the planet started by hacking straight into index.php, then wrote some code for guestbook.php, and so on. Then you realise how much you're repeating yourself and start refactoring to classes and libraries.
Frameworks are the natural next step up from that. The term covers quite a range of products; some that tie you very closely to a specific way of working, and some that are more a library with some loose front control.
I'd advise you to choose a loose MVC framework, which gives you a good structure to work within, but doesn't overly constrain you, and should allow you to use existing libraries. I've not used CakePHP - my experience is with Zend Framework, which I like a lot (not that it's flawless). However, I have worked with another developer to compare the functionality of Cake and ZF, and from what I've seen Cake has many of the strong points that ZF displays. In fact, in many places it almost seems you could convert code from one to another by changing a few classnames.
I suspect Cake's not a bad choice at all, but I can't recommend it as I don't know enough about it. ZF I do know, pretty well now, so I can recommend it - and the docs are now pretty good.
Before you dive into either Cake or ZF, you'll need some understanding of the MVC design pattern. Jason Sweat's book is a good, if slightly dated introduction, and the ZF manual is also pretty strong.
By the way, it's not a choice between "Cake and Pure PHP". Cake (and ZF) are both "Pure PHP". The difference is between "PHP I wrote", and "PHP someone else wrote" (so I didn't have to). From this, the important bit is that you trust the quality of that "someone else's code", which in this case you'll have to do by recommendation and reputation.
But don't just go asking "What's the best PHP framework?" - that's like asking for the best text editor ;) And I'm sure this response (or question) will get tagged 'subjective' in mere moments.
I've been using Cake for a couple of years. I'd say if you haven't used any MVC framework before, you should definitely learn one to expand your horizon.
It's not really about using the framework for your convenience. It's about seeing how things are done in the framework-land. You'd really gain some insights that you can carry over even if you later decide not to use a framework.
Your description of the project didn't sound too huge. However, learning an MVC framework is some serious learning curve there. Basically you'll feel like you're learning a whole new programming language. So for your situation if you really do decide to try a framework, you might want to factor that in your schedule.
To get you started, I personally think CakePHP has a more elegant solution and has tighter design philosophies. CodeIgniter, on the other hand, seems more natural to "pure PHP-ist" because it's less abstract so it might be easier to pick up.
To answer the titled question though, I'd think any huge project should roll their own from the start instead of using a framework. The whole point of using a framework is because you want to leverage some of the stuffs they have built in for you. But for really huge projects, many of the parts should be customized anyway, so you might found yourself restricted by the framework more than leveraging it.
But then again, I really don't think your project (by your description) is anything near huge. As a ballpark estimate I'd say any project under 50k - 100k hits a day can safely benefit from using a framework.
I do not say CakePHP. But any framework will do. The major benifit will be you will get a default folder structure, skin, language framework (oscommerce etc. do). You will be customizing this framework. Most features will/may there be by default, like email sending, page creation, Menu generation etc.
You did not say what kind of application you plan (may be because of NDA). More details, more accurate answers.
I agree that it shouldn't be a decision whether to use CakePHP, but whether to use a framework at all. There are a multitude of PHP frameworks out there (Cake, Symfony, Codeigniter, Zend, etc.) and each has it's advantages and disadvantages.
If it was me, I'd use a framework just to strictly enforce some MVC rules... with a large project, keeping things structured helps down the road when someone else inherits the system.
The key here, is don't get lulled in by the "code generation" aspects. If you don't know the framework (or don't know the language as well as you could) down the road, the code generation could be more of a headache than it's worth.
Using a PHP framework like cakephp will reduce the amount of code you need to write. In cakephp there are many things that will save time like using elements to display snippets of code that you use often. If the project is really big, it will help tremendously because your code will be shorter and much more clean and organized. It will be much more easy to maintain as well.
I think that pure php would be the best option because if you use a framework you are restricted to their boundaries,
whereas without framework you are free to design anything, if you think that you have the best capability of solving problems and making algorithms then you must go with php not any kind of framework
and if you just want work to be done then you must go with framework i haven't worked on framework by have some knowledge of cake php i didn't liked it as i think i am tied with some rules, i prefer writing my own code and in case you want to do less work in future just write you own rules (its like making your own framework) just save every thing you created in small files and then use them in you other project just like one of the benefit of OOP(Object Oriented Programing)
If you know PHP, you'll learn more about how to implement common design patters if you start reading other peoples code. The more you read, the more you'll get perspective on what good code looks like, and what bad code looks like.
It is tempting to "code-your-own" because you will understand it more fully, but remember, you're not going to be the only one working on this, and one day, you might actually want to work on something else, and having a system which is widely implemented and understood can make it easier to move on.
As far as whether cakePHP a good choice for your particular project, it's hard to say without knowing more than it's going to be "bigger".
Everything depends on the project and the project stake holder. If there is going to be a lot of modification, either during development or after the project goes live, a framework can be pretty limiting to someone without a strong grasp of the theories behind the framework (not a judgement on the programmer, just a statement.)

An amnesia patient's "first" functional language? (I really like Clojure...)

I was recently diagnosed with a cascading dissociative disorder that causes retrograde amnesia in addition to an existing case of possible anterograde amnesia. Many people have tried to remind me of how great a programmer I was before -- Right now I get the concepts and the idioms, but I want to teach myself whether I know or not. I think I can overcome the amnesia problems in part with it.
My question for you, stackoverflow, is this: I recently found Clojure and it... it feels good to use, even in just copying down the examples from whatever webpage I can find. My goals in learning a functional programming language are to create a simple webserver, an irc AI bot of some variety, and a couchdb-like database system, all of which lightweight and specifically for education. What flaws does Clojure have? Is there a better functional programming language to use right now for education /and/ application?
I think Clojure is a very nice language. If I should point to any defect it is that it's very new, and even though the language seems very mature and production ready, the tools and frameworks around it aren't. So if you are going to make, for instance, a web-app, don't expect to fire three commands and have a "Your first web app is running, now read this documentation to create your models"-page on your browser.
There aren't that many libraries written in Clojure yet either, but that's not a huge problem if you consider that you can use almost anything written in Java.
Haskell currently has a large following and a growing base of libraries and applications. It's also used for education and research. I find it a very nice language to use.
Haskell, Erlang and Clojure are all good choices. I would personally recommend Clojure, you might be able to do some interesting database stuff with the Software Transational Memory system that is part of Clojure.
You list CouchDB in your question, and it's written in Erlang, which is meant to be a pretty engrossing language once you get into it.
I have no personal experience with Clojure, but i really recommend F#. It's quite a powerful language in the style of OCaml. I really like it because it's debugging tools and IDE are second to none, and you can take advantage of practically every library on the (huge) .NET platform.

Resources