-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create IA players #207
Comments
Working on machine learning ... |
To be able to create an use bots, be it AI or not, would be wonderful for the Steemnova community. The only needed restriction could be that the bots are clearly identified as such. |
Thank you for your reply. Actually I'm already working on that!. Actually, instead of using the steemnova engine for testing (because this engline was made to work using php as "brain"), i'm developing a full new engine, using php only to display info and making all the "thinking" within SQL Side. Identifying IA as such is gonna be easy, but the goal is to set their IA to "play" not to be farms. That's the main reason i'm developing the new engine to allow machine learning in the process (Yes, I might be going too deep into this, but I like the challenge). In time we're gonna be learning from bots for sure. There's an example of my environment values. Ofcourse there's still more things to add to allow bigger events, those are my bassics for now. If you pay attention, you'll see "max planets", and "min/max fields", instead of using ranges for planet position like ogame, i will use randomness to set each planet's fields. The difficulty in this case will be get the biggest possible, because the first positions will have a very low chance to be that big, same for the furthest. I still need to check the math for that.... So many things to check haha |
In my opinion the best place to set AI is in PHP Cronjob. Cron script can iterate over bot-players specified in database and take actions for them. All in random interval. @koburk, as actions I mean sending commands to SQL. |
You're right, but having something in php calling sql or just having sql, I much rather the second option. Barely no performance issues but because you can have all the code in the same place. At the end that "cron" can be scheduled in mysql too. |
It depends of how many bots should be executed. One per cron or multiple
per cron?
If is one per cron well it's playable, but one player per cron you barely
notice his progress in-game (mainly if is not cron executed per minute).
A class to be executed per player request could be a good choice. Basically
player would be playing as "2" players (im at buildings, one random bot
randomly builds, im at fleet, one random bot randomly fleets). It's better
to have a minimal task exectued on player request rather than an
exhaustive cronjob. A bot cronjob can eat up to 10-30 secs on run, and no
one wants to wait such time. If is 5 minutes per cron, then it's ok, 20
seconds in 5 minutes its barely noticeable, but per minute, not the best
approach.
Source: I have a cronjob bot mode, and working on a request one which has
shown better results.
koburk <notifications@github.com> escreveu no dia segunda, 3/02/2020 à(s)
12:31:
… You're right, but having something in php calling sql or just having sql,
I much rather the second option. Barely no performance issues but because
you can have all the code in the same place. At the end that "cron" can be
scheduled in mysql too.
I work as DBA, so that's why I might be a bit commited to use a bit more
the mysql power instead of using php to iterate or take actions, those are
way faster using pure sql (Focused on big amounts of information).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#207?email_source=notifications&email_token=AIX3PN4NL7BS4R34CN5O7ZLRBAMBPA5CNFSM4KNHEBBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKT24XA#issuecomment-581414492>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIX3PN2L7LC2242QAOK5IYLRBAMBPANCNFSM4KNHEBBA>
.
|
I'm not 100% sure, it was a bit hard for me to really get what you were trying to say, correct me and my apologies in advance if i'm not getting your idea... Seems like you are trying to figure out the best way to improve performance, but there's no much to be worried about. During testing, i was able to get 10.000 IA players runing at the same time, checking for actions ever 1 sec with over 97% of success The global/general idea is: you ask those 10.000 IA players: "are you online?" if it's online you ask again: "are you going to do something?", those two questions are set to enable actions or not, then if those two answers were YES, you ask: "do you wanna try something new or follow machine learning stuff?", based on that: "what do you want to do?" that's a very brief idea. |
No problem! What I was trying to say is the game have some demanding
queries to process in-game development such assign building to queue,
trying to send ships, update planet resource, etc... These queries on cronjob take some response time where real player requests are delayed because server is processing the bot ones.
If you found a way to counter all of this and have a responsive bot/AI
system, man, that's perfect.
koburk <notifications@github.com> escreveu no dia segunda, 3/02/2020 à(s)
14:43:
… I'm not 100% sure, it was a bit hard for me to really get what you were
trying to say, correct me and my apologies in advance if i'm not getting
your idea...
Seems like you are trying to figure out the best way to improve
performance, but there's no much to be worried about. During testing, i was
able to get 10.000 IA players runing at the same time, checking for actions
ever 1 sec with over 97% of success
What does that 97% of success means?, basically it means you can run 9700
orders every 1 sec without worries about if those were executed, but that's
a full push try. Normally we wouldn't be using as muchas CPU/Memory trying
to simulate every 1 sec, instead every 1 minute to hours between them (the
difference would be the IA play style). Basically if we get to play vs
10.000 IA players, not everysingle one of them will be doing stuff at the
same time, but having a % of performing an action.
The global/general idea is: you ask those 10.000 IA players: "are you
online?" if it's online you ask again: "are you going to do something?",
those two questions are set to enable actions or not, then if those two
answers were YES, you ask: "do you wanna try something new or follow
machine learning stuff?", based on that: "what do you want to do?"
that's a very brief idea.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#207?email_source=notifications&email_token=AIX3PN3534UFL5HRXQO7DK3RBA3S3A5CNFSM4KNHEBBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKUJ43I#issuecomment-581475949>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIX3PN5FDTI4RONNCHGUW23RBA3S3ANCNFSM4KNHEBBA>
.
|
Indeed, the queries are not the same as user queries (Not stored, processed instead). |
At this point, my IA_Players are able to build stuff... Here you can see my log (From newer to older descending order). DB Object ia_connection manages ia_brain object This is being hosted on a small virtual machine and works without any issue for now (fingers crossed) |
Full LOG DB Object ranking_hist created |
I'm so proud, my lobotomized retarded IA Players are able to decide if they're gonna get energy from upgrading solar plants or buying satelites... |
Excellent! Good for you! Will you open your server for competition among
bots?
El mié., 19 feb. 2020 a las 10:23, koburk (<notifications@github.com>)
escribió:
… I'm so proud, my lobotomized retarded IA Players are able to decide if
they're gonna get energy from upgrading solar plants or buying satelites...
I just wanted to share it with you guys, I'm like a father for them ...
haha
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#207?email_source=notifications&email_token=AHBGYP4E5F557Y5QPZTJAFLRDUXE3A5CNFSM4KNHEBBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMH2CWA#issuecomment-588226904>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHBGYP4RIVLBIOPWA2JOW73RDUXE3ANCNFSM4KNHEBBA>
.
|
I will open the server for testing once my bots are less retarded and not all of them get lobotomized haha. Also, I've managed to give some sort of personality to each IA. Currently if you attack a player multiple times it will improve their defences and will "find a way" to not get attacked that much. This process was made because of 2 points. |
:) Currently teaching my brain-dead lobotomized retarded IA_Players to colonize.... Oh sh@t, i might need to recreate the fleet table structure to allow more stuff, like: |
In order to get the most of my system, I've moved the most used tables into memory, because of that a few things had to be changed, like adding a backup every 3 minutes to disk tables and if something goes wrong (Server/MySQL shutdown/restart for any reason), every 3 minutes the system checks if memory tables are populated, if not the system fills them and we're ready to go again :). Also, now is possible to play on different universes with the same user/pass (Still, a new login is required, i'm not trying to include multiple users within multiple univereses a built-in for now, but people can do it if they want) Update
|
Best design ever! haha, nah, but seriously, this is moving forward. Next steps will be enable sections to build structures -> researchs -> defences -> ships in that order. Also, anyone insterested on helping me catching bugs and start developing an emipre before hand is welcome on board! Today i will create about 20.000 players and they will stay for now. In theory there's no need to reset the world anymore. So since tomorrow you can create an account and ... don't know what you'll be able to do for now O.o ... figure out on rankings hehe if somethings goes wrong, feel free to send me an email at koburk@hotmail.com |
This might be a bit hard but challenging and Imo, very interesting. We could have tons of IA players to fight with (More places to attack to start and they can attack too, so be aware!).
Steps:
IA Players will have preferences such as:
noobstyle might change into another style after some time (Everyone learns to play!).
Based on IA style, the colonies will be placed in different positions to fit its play style.
Based on IA Player experience, reciclers will be sent before/during/after the attack.
Aggresive style will try to hunt players down. Tons of variables will ve involved, such as IA Player points, profits after destroing the enemy fleet,moons, etc.
Cheers
Extra info:
Added New Objects
Drilling: Allow the use of asteroids and enables the ship "Driller".
Level 1: Allow metal extraction
Level 4: Allow crystal extraction.
Level 7: Allow deuterium extraction.
Level 10: Allow dark matter extraction.
Dark Matter Understanding: Allow our scientists to generate dark matter within our labs. Each level will grant 1 DM / Hour.
The text was updated successfully, but these errors were encountered: