Thread: AI system?

Results 1 to 11 of 11
  1. #1
    xxark's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0

    AI system?

    Hi, I'm trying to make a simple rts game in c++. Im hoping it's possible. I havn't coded anything at all for it atm, it was a fairly new idea. I understand the basics of c++ i got a book to help me. My question is, however, would i code an ai system in the game (which would really make it the game loop i guess?) or would i code it in some AI coder program?


    Thanks for the comments!

    Bump??????
    Last edited by Jorndel; 06-09-2013 at 06:39 AM.

  2. #2
    FingerLickin'Good's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    JAville
    Posts
    11
    Reputation
    10
    Thanks
    0
    Before the programming part of your game comes, what is the point? Do you have it laid out (goal, rules, players, etc.)? Will it be console? Win32?

    (There's a book for this, there's a book for everything.)
    Last edited by FingerLickin'Good; 06-09-2013 at 07:09 AM.

  3. #3
    xxark's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    Goal: destroy enemy base first. Players: 2;1 human, 1 AI. I have all the rules writen down. Just a win32 application in the cmd box. I have a c++ through game design book, however im only halfway through. Im not sure if it goes over AI...

  4. #4
    FingerLickin'Good's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    JAville
    Posts
    11
    Reputation
    10
    Thanks
    0
    What is the process you go through to beat the enemy? (ie: battleship, random guesses; mastermind, logic or something of that sort; connect-4, place 4 pieces in a consecutive line)
    Last edited by FingerLickin'Good; 06-09-2013 at 08:58 AM.

  5. #5
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love
    The easiest way to create an AI is to just create a bunch of conditional statements that keep being looped through for each possible situation.

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  6. #6
    xxark's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    Hmm. You would start with a number of units, a factory and a main base area. You start by placing your units (a max of say 5 spaces from the main base) i guess the battle ground will be an array and to place characters, you simply enter in coordinates. Any way. Its like an rts game. So the rounds would go by turns. First your turn (start with upgrade stage, then move stage, then attack stage)

    ---------- Post added at 11:15 AM ---------- Previous post was at 10:30 AM ----------

    Quote Originally Posted by Altarium View Post
    The easiest way to create an AI is to just create a bunch of conditional statements that keep being looped through for each possible situation.
    Hmm. That seems like it would take a while... I wouldnt even know where to start

  7. #7
    ~FALLEN~'s Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    devenv.exe
    Posts
    529
    Reputation
    23
    Thanks
    328
    My Mood
    Inspired
    Quote Originally Posted by Altarium View Post
    The easiest way to create an AI is to just create a bunch of conditional statements that keep being looped through for each possible situation.
    No... Just no.....
    -facepalm-

    **Do not do this**

  8. #8
    Ionizer's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    105
    Reputation
    30
    Thanks
    9
    My Mood
    Amazed
    Quote Originally Posted by ~FALLEN~ View Post
    No... Just no.....
    -facepalm-

    **Do not do this**
    Says the guy who took 713 lines for ATOI, which had like 100 case statements.

    No... Just no.....
    -facepalm-

  9. #9
    dimast's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    1
    the best choice is a machine learning. google for it, there is a lot of samples. It would be quiet useful for you to implent the system of such kind.
    And if everything is ok it will pwn every single player in your game(with small subset of meaning characteristics)

  10. The Following User Says Thank You to dimast For This Useful Post:

    ~FALLEN~ (06-10-2013)

  11. #10
    ~FALLEN~'s Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    devenv.exe
    Posts
    529
    Reputation
    23
    Thanks
    328
    My Mood
    Inspired
    Quote Originally Posted by Ionizer View Post


    Says the guy who took 713 lines for ATOI, which had like 100 case statements.

    No... Just no.....
    -facepalm-
    You may see it as a pre-mature optimization but when you're writing your own runtime, STL, etc it's not so evil..
    Regardless, there's plenty of other implementations I have for atoi that was just one of them.

    ---------- Post added at 02:43 AM ---------- Previous post was at 02:41 AM ----------

    Quote Originally Posted by dimast View Post
    the best choice is a machine learning. google for it, there is a lot of samples. It would be quiet useful for you to implent the system of such kind.
    And if everything is ok it will pwn every single player in your game(with small subset of meaning characteristics)
    I personally prefer neural networked "learning".. but I guess the type of "learning" you should use is dependent on the type of task you wish to preform.
    Last edited by ~FALLEN~; 06-10-2013 at 01:47 AM.

  12. The Following User Says Thank You to ~FALLEN~ For This Useful Post:

    dimast (06-10-2013)

  13. #11
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    5,052
    My Mood
    Cool
    Quote Originally Posted by Ionizer View Post


    Says the guy who took 713 lines for ATOI, which had like 100 case statements.

    No... Just no.....
    -facepalm-
    There is optimize code, there is fast code, there is size code and then there is beautiful code or what i call artist code. Because he had all those lines, doesnt mean he wasn't going for something from it, for example, lets say u wanted convert a texture from RGB

    u can simple use a while loop coping all the texels or u can use SSE/AVX instructions, clearly the SSE/AVX instructions are way more code, but they are WAY faster.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  14. The Following User Says Thank You to topblast For This Useful Post:

    ~FALLEN~ (06-21-2013)

Similar Threads

  1. cool system.mrs
    By 1h1a1i in forum Gunz General
    Replies: 25
    Last Post: 03-16-2008, 11:51 AM
  2. Unpacked system.mrs
    By 1337Sasuke in forum Gunz Hacks
    Replies: 1
    Last Post: 03-22-2006, 02:05 AM
  3. EndLess' edited system.mrs
    By EndLess in forum Gunz Hacks
    Replies: 22
    Last Post: 02-22-2006, 09:22 AM
  4. [Request] System.mrs
    By Xgs in forum Gunz General
    Replies: 10
    Last Post: 02-21-2006, 12:11 PM
  5. System Hacker For Gunz
    By gameking85 in forum Gunz Hacks
    Replies: 11
    Last Post: 02-09-2006, 11:57 AM