Openkore.com

OpenKore Forums
It is currently 19 Jul 2018, 15:21

All times are UTC - 5 hours [ DST ]





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 45 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: New Ai Ideas
PostPosted: 17 Sep 2008, 12:26 
Offline
Super Moderators
Super Moderators
User avatar

Joined: 06 May 2008, 12:47
Posts: 801
This is not exactly about AI, but since you were mentioning Xkore.
Here is an interresting topic:
http://bibian.ath.cx/openkore/viewtopic.php?t=37936&postdays=0&postorder=asc&start=0

Especially for xkore 2 and proxy its getting really hard to support different serverTypes since they interfere with eachother.
While fixing something for one serverType you must really be carefull not to break another one.
What about moving serverType specific stuff to for example:
Network::Send::ServerTypeX
Or maybe even creating new modules for this?
(so that while using Network::DirectConnection you won't have to load any of the xkore 1, 2, 3 modules)
Anyhow, we should think of better ways to implement the xkore's.

_________________
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...

Mount Doom awaits us, fellowship of OpenKore!


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 18 Sep 2008, 07:20 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1299
Technology wrote:
This is not exactly about AI, but since you were mentioning Xkore.
Here is an interresting topic:
http://bibian.ath.cx/openkore/viewtopic.php?t=37936&postdays=0&postorder=asc&start=0

Especially for xkore 2 and proxy its getting really hard to support different serverTypes since they interfere with eachother.
While fixing something for one serverType you must really be carefull not to break another one.
What about moving serverType specific stuff to for example:
Network::Send::ServerTypeX
Or maybe even creating new modules for this?
(so that while using Network::DirectConnection you won't have to load any of the xkore 1, 2, 3 modules)
Anyhow, we should think of better ways to implement the xkore's.


OK. I'll Explain.
What I want, is loose any Direct Calls to AI form Other Modules, and Loose All Calls to Network from Other Modules, except for Action Modules, witch purpose is to make any kind of Actions and Calculations that Other Modules need to do.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 19 Sep 2008, 03:51 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1299
Threading Model:
Kore -- (The main Thread that will wait for other Threads to finish)
|-Interface (non blocking Thread; used to make OpenKore Interactive Interface. Location: Interface)
|-KoreStage (blocking Thread, end when done; used to prepare all the settings. Location: KoreStage)
| |-StageLoadPlugins (non Thread; used to load Plugins. Location: KoreStage::StageLoadPlugins)
| |-StageLoadDataFiles (non Thread; used to load all Data Files including Configs. Location: KoreStage::StageLoadDataFiles)
| |-StageInitPortalsDatabase (non Thread; used to load and prepare Portals Database. Location: KoreStage::StageInitPortalsDatabase).
|-AI (non blocking Multi Thread; used for Logic and callings to AI::ModuleMgr. Location: AI)
| |- AI Modules Mgr (non Thread; used for Loading AI Modules and asking them. Location: AI::ModuleMgr)
| | |-AI Modules (non Thread; used to make some decisions, used by Tasks as Helpres. Location: AI::Module::* )
| |- Environment Que Dispatcher (non blocking Sub Thread; used to make changes on Global Environment Variables based on Que. Location: AI::EnvironmentQueDispatch )
|-Network (non blocking Thread; used to add Networking Support, PUSH variables to Environment Que. Location: Network )

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 23 Sep 2008, 20:08 
Offline
Developers
Developers

Joined: 04 Apr 2008, 13:33
Posts: 157
The solution to the xkore problem is to create a single "network handler" that kore calls no matter what. It needs standard functions like Load, send, recv, socket crap, and access to a callback function to handle client->server packets from external sources. When direct connection mode is in effect the send/recv/etc functions directly map to the real ones, and because there is no client module loaded the function to handle external client->server packets is never called. When a specific network mode is enabled the send/recv/etc functions map to that plugin, and that plugin calls the client->server function when its client attempts to send a packet. That way Kore is always acting the same way, but the handler is able to mediate what is going on.

Configuration wise it adds a single option that we don't even have to make available to the public, we could just allow the external client "plugin" to define this option when it is loaded.

Option 0: External clients handle all connection/sync packets and kore only activates ai in the appropriate situation
Option 1: Kore generates all connection/sync packets and blocks the client's attempts

Edit: It fits right in with klab's Network. This idea needs some work, I am really sick and probably messed it up pretty badly. The basic idea is that Kore should have no idea if it is using a direction connection or an xkore mode, and that the normal packet generation code should have no idea either. This new function exists to moderate if kore or the client's packets are used, and as a result should fix a lot of compatability issues as well as encourage many different external interfaces because they only need to be updated in a single file.
Technology wrote:
Especially for xkore 2 and proxy its getting really hard to support different serverTypes since they interfere with eachother.
The reason there are so many issues is because XKore is just tacked on. It was implemented in a way that only cleanly supports one mode, but as we all know there are multiple XKore modes now. On top of that it's a pretty big mess how Kore and XKore interact, and it's something that needs to be changed if we are rewriting things.

_________________
Oh no.


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 23 Sep 2008, 21:42 
Offline
Perl Monk
Perl Monk

Joined: 04 Apr 2008, 17:26
Posts: 811
Motivus wrote:
The solution to the xkore problem is to create a single "network handler" that kore calls no matter what.

How the fuck long ago did I say this and it's only now coming back up? :|

_________________
cs : ee : realist


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 23 Sep 2008, 23:17 
Offline
OpenKore Monk
OpenKore Monk

Joined: 04 Apr 2008, 10:10
Posts: 474
Most probably nobody understood exactly what you were saying back then, and Motivus just now clearly explained the idea.

That, or nobody really took you seriously :)

_________________
Got your topic trashed by a mod?

Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.

Have a nice day.


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 23 Sep 2008, 23:28 
Offline
Developers
Developers

Joined: 04 Apr 2008, 13:33
Posts: 157
kali wrote:
Most probably nobody understood exactly what you were saying back then, and Motivus just now clearly explained the idea.

That, or nobody really took you seriously :)
I've mentioned it in the past as well, although it was never seriously proposed. There's also some things not clear about the implementation I talked about, and anyone can hammer out the details if they like.

_________________
Oh no.


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 24 Sep 2008, 00:06 
Offline
Perl Monk
Perl Monk

Joined: 04 Apr 2008, 17:26
Posts: 811
kali wrote:
Most probably nobody understood exactly what you were saying back then, and Motivus just now clearly explained the idea.

That, or nobody really took you seriously :)

I think the very first time I said it my exact words were "why the fuck does XKore have network code?" No one could ever give me a straight answer as to why there was network handling in XKore leading me to believe that either everyone else wondered the same thing, no one else noticed it, or no one had a good excuse for such a shoddy programming technique.

_________________
cs : ee : realist


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 24 Sep 2008, 03:22 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1299
Motivus wrote:
The solution to the xkore problem is to create a single "network handler" that kore calls no matter what.


OK. I agree too.
But we need to work out some things.
Let's see: Current dev Version of "AI 2008" is Multi Threaded now. Every thread can do whatever he wants.
Limitation: Network do only Network Stuff, it don't access any of "Environment" variables or "AI" or anything else, just some global variables (don't forget, NO DEAD LOCKS).

Quote:
Q: So you ask. How the Hell "Kore" itself should should know what's happening????
A: Kore uses Que messages to communicate with each "Big" module.
For Example: Actor moved, Network push a variable to "AI Environment Que" about actor and it's changes, "AI Environment Que" pop that message, and handle it properly.


Back to Networking!
Basic Networking, is to communicate Directly with Server.
xKore (1), it's a Basic Networking, with Enabled Client Packet Parsers.
xKore (2); xKore (proxy), Basic Networking, with Enabled Client Packet Parser, and Server like packet sender.
All of these, should use the same like system, as current Send Recive works.
You can use another additional Thread in xKore (2) and xKore (proxy), just don't forget to handle "$quit" properly, and call "yeald()" after every iteration.

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
 Post subject: Re: New Ai Ideas
PostPosted: 17 Oct 2008, 10:47 
Offline
Administrator
Administrator
User avatar

Joined: 24 Apr 2008, 12:02
Posts: 1299
Added a Draft and TechSheme for new SQLLite based Tables.
http://forums.openkore.com/viewtopic.php?f=38&t=3172

_________________
Join our Team. Click here.
Image


Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 45 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group