Raised This Month: $115 Target: $400
 28% 

Artificial intelligence (neural networks)


Post New Thread Reply   
 
Thread Tools Display Modes
DJEarthQuake
Senior Member
Join Date: Jan 2014
Location: Midwest
Old 03-19-2019 , 10:27   Re: Artificial intelligence (neural networks)
Reply With Quote #11

Everything is being automated these days including training. This code is modeled off human brain. Jussi made bots that make their own waypoints. That is open working example on Github.

4 min example.
Intro to example.

A simple non NPC Pawn example would be a map changing plugin that makes attempt to attract players based off of something other than just fixed CVAR of time. Keeping a catalog of day of week, time of day, number of players on map, and map name is a start.

There is a bit of buzz on the map changing programs. Perhaps somebody will how it should be done.
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty — a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is online now
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 03-20-2019 , 11:11   Re: Artificial intelligence (neural networks)
Reply With Quote #12

Would be great to see a NPC (coded with pawn) working with this include, because to be honest I did not understand anything.
__________________
Accepting private $$$ plugins requests.

@Steam: crazy770
@Discord: CrazY.#5317

Website | Channel


Last edited by CrazY.; 03-20-2019 at 11:12.
CrazY. is offline
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 05-30-2019 , 16:50   Re: Artificial intelligence (neural networks)
Reply With Quote #13

Thanks for the feedback again

Last changes
- Optimizations: mainly a lot of reduced loops.
- Added: a lot of explanations in the include (.inc).
- Added: neural_learn_raw and _think_raw.
- Renamed: previous functions like neural_learn_values now are neural_learn and same with _think.
- Added: neural_input_range and _output_range to define individually ranges for every value (more easy to use).
- Removed: neural_simple.inc.
- Changed: neural_multi.inc now is just neural.inc

Possibles next updates can be:
- Easy support for strings as input, for example, to recognize texts
- I see a few more optimizations that can be made.
- Upload a video making a plugin from zero like "neural anti-spam" or something like that to really get how it works.

edit:
One suggestion could be take the example code and remove all the comments, benchmark and neural_save/load to see the code itself and initially omit the explanations then gradually see how everything works.

Last edited by LuKks; 05-30-2019 at 19:15.
LuKks is offline
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 05-31-2019 , 15:17   Re: Artificial intelligence (neural networks)
Reply With Quote #14

There's something I did not understood. What neural networks can be used in pawn for? As Crazy said, can NPCs (or bots) be programmed using the same concept?
__________________
thEsp is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-31-2019 , 22:21   Re: Artificial intelligence (neural networks)
Reply With Quote #15

Agree, this is basically useless to the AMX-X community, IMO. And I don't mean this in a bad/negative way, but nobody is going to know how to apply this to a game-play plugin. You should create a plugin that uses this for actual game play purposes, not just a plugin that does calculations and prints them.
__________________

Last edited by Bugsy; 05-31-2019 at 22:23.
Bugsy is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-02-2019 , 13:24   Re: Artificial intelligence (neural networks)
Reply With Quote #16

Tbh, the main purpose for A.I is letting it make basically or literally what normal humans/players can do and even better/faster. As Bugsy said, it could be kinda useless to programmers even Veteran ones who didn't understand everything at all. So I'm another person who says it: That's freaking cool, but could be useless since we cannot apply this on good purposes as NPC's or whatever we want to make but instead of registering pre-words or actions that can't be done, it'll learn and avoid in the next time.

That's my vision of A.I, maybe my vision is too hard for AMXX since it's not that supportable, I guess.
__________________
• BattleRoyale Mod
• Public PugMod
• Furien Mod

-

Currently working on Thanos vs. Avengers: 15%

Last edited by EFFx; 06-02-2019 at 13:29.
EFFx is offline
Send a message via Skype™ to EFFx
thEsp
Veteran Member
Join Date: Aug 2017
Location: Gjilan, Albania
Old 06-02-2019 , 13:52   Re: Artificial intelligence (neural networks)
Reply With Quote #17

@EFFx
I don't agree with the concept of machines being able to learn. Something that does not have senses,feelings and ability to predict cannot evolve.

Yeah, even veterans may not be aware of this deep section. I've thought some ideas about usage of A.I (in Pawn) such as an verify system (similar to captcha). Turns out there can be achieved something via this concept, BUT not with resources we maintain right now. You can't do much with some decimal numbers translated to regular integers. At least these are my thoughts.
__________________

Last edited by thEsp; 06-02-2019 at 13:58. Reason: Misspelling
thEsp is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 06-02-2019 , 14:47   Re: Artificial intelligence (neural networks)
Reply With Quote #18

Poor Ultron...
__________________
• BattleRoyale Mod
• Public PugMod
• Furien Mod

-

Currently working on Thanos vs. Avengers: 15%

Last edited by EFFx; 06-02-2019 at 14:47.
EFFx is offline
Send a message via Skype™ to EFFx
LuKks
Senior Member
Join Date: Dec 2012
Location: Argentina, Santa Fe
Old 06-20-2019 , 16:35   Re: Artificial intelligence (neural networks)
Reply With Quote #19

Right.

Quote:
Originally Posted by thEsp View Post
There's something I did not understood. What neural networks can be used in pawn for? As Crazy said, can NPCs (or bots) be programmed using the same concept?
When you have a problem that maybe you don't know how solve it then you can just send some labeled data to the neural network, so after the learning process you will can achieve the problem. Obviously, you also can do it in a imperative way with if, else, etc but sometimes there is better and simple ways.

Quote:
Originally Posted by Bugsy View Post
Agree, this is basically useless to the AMX-X community, IMO. And I don't mean this in a bad/negative way, but nobody is going to know how to apply this to a game-play plugin. You should create a plugin that uses this for actual game play purposes, not just a plugin that does calculations and prints them.
I have your suggestion in mind from the beginning but this contribution is still in development. Especially at the beginning, it was not easy even to make a simple plugin. Little by little I'm giving it improvements to be easy to use.
For example, the last optimizations are important to "think" in real time, for example, it's still useful for NPC. Nobody wants a server that consumes many resources. In addition, they will want to have many NPCs at the same time, each optimization is important.
Also, the last update greatly improved the flexibility of use and keeping good performance.

Quote:
Originally Posted by EFFx View Post
Tbh, the main purpose for A.I is letting it make basically or literally what normal humans/players can do and even better/faster. As Bugsy said, it could be kinda useless to programmers even Veteran ones who didn't understand everything at all. So I'm another person who says it: That's freaking cool, but could be useless since we cannot apply this on good purposes as NPC's or whatever we want to make but instead of registering pre-words or actions that can't be done, it'll learn and avoid in the next time.

That's my vision of A.I, maybe my vision is too hard for AMXX since it's not that supportable, I guess.
What I marked in bold, I was thinking about it and that's why I detailed all the code (.inc file).
In addition, I always improve the API to reduce complexity and this breaks compatibility so I don't bother doing an advanced plugin now, I could but it's too much maintenance and I have the same post in Spanish (amxmodx-es) and English.

I think that AMXX is perfectly compatible, there are many mathematical details that I don't know and that could be useful for optimization in the learning process, for example, adaptable learning rate. My knowledge is purely self-taught since always so I need time.
Also, I never do developments in SourcePawn (was my first language but I'm with others things since a lot of time) so I'm not so capable of doing NPC now, I plan to use something already developed as base: https://amxmodx-es.com/Thread-NPC-Cucarachas but takes some time because I have more priorities.

Quote:
Originally Posted by thEsp View Post
@EFFx
I don't agree with the concept of machines being able to learn. Something that does not have senses,feelings and ability to predict cannot evolve.

Yeah, even veterans may not be aware of this deep section. I've thought some ideas about usage of A.I (in Pawn) such as an verify system (similar to captcha). Turns out there can be achieved something via this concept, BUT not with resources we maintain right now. You can't do much with some decimal numbers translated to regular integers. At least these are my thoughts.
I disagree a bit, there are many types of neural networks. For example, there is reinforced learning, something like dopamine, when you do something well it's reinforced by the positive result and vice versa when the result was not the expected. In a game when the bot win or lose then positive or negative reinforcement is applied.
Anyway, don't expect them to self-evolve from nothing, everything has to be pretty specifically indicated but you'd be surprised :p

By the way, this library is not that kind of neural network. It's deep feed forward.

You said "You can't do much with some decimal numbers translated to regular integers" but, in fact, yes. It's how any neural network is handled.


For everyone:
Maybe you will not apply neural networks in AMXX but yes in other languages, all this is just a bit of knowledge that can be used in more places.

TensorFlow developed by Google:

That is an extremely basic example (typical xor) but they have the most completed and great library to do anything with a lot of documentation, examples, tutorials, videos, etcetera.
LuKks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:46.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode