Results 1 to 10 of 34

Thread: New ideas for AI in games?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I'd love to have a PGD Challenge that is all about AI.

    The thing I love about the whole topic, in some ways Ingemar is right (it's a bit overhyped), you can hack at it and as long as you make it look like it's doing something intelligent, or behaving intelligent, then you have a pretty good game AI. It's something that can be easy to get into, but can be hard to master.

    I think such a challenge would have your players go against and try to "beat" it OR create non-player AI character/bots, etc that have to work with the player in some way.

    Designing the challenge rules might be as interesting as designing the games that go into the challenge it's self.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  2. #2
    Speaking of AI challenges, one just started on monday. Sadly it's hosted in finnish only. There's been many similar no-reward contests throughout the years, lots fun. They make up new game and rules, and let people use whatever programming language they want. You send source code only for the console application, and hoster makes binary of it on Linux test machine. Then they make them play against eachother and count points.

    Currently up is: http://www.ohjelmointiputka.net/kilp...nnus=valtapeli
    Not sure if google translates the page well, but i'll explain idea shortly. 16x16 board, where players fill 1 empty cell per turn. At the end all solid areas are calculated, and you get exponentially more points the bigger the area is. So 1 big connected area would give most. Other AI/player is only harassing, trying to disconnect the areas of other.

  3. #3
    Quote Originally Posted by WILL View Post
    I'd love to have a PGD Challenge that is all about AI.
    How about something like this:

    There is a defined arena and set of rules. We need to write a bot that will be fighting in that arena against other bots? AIs could be loaded to the main game via a DLLs. Of course someone would have to prepare the main application - The Arena.

  4. #4
    Quote Originally Posted by wodzu View Post
    How about something like this:

    There is a defined arena and set of rules. We need to write a bot that will be fighting in that arena against other bots? AIs could be loaded to the main game via a DLLs. Of course someone would have to prepare the main application - The Arena.
    The only problem with that approach is cross-platform issues. Could one make a cross-platform solution? The easiest way is to use scripts, but a PGD challenge should ne in Pascal. Pascal Script? (If I could only figure out how to use it.)

  5. #5
    I would probably go with a client server approach using TCP. The main game, the arena, will be the server and will wait for bots to connect as clients. This should allow for all the Pascal dialects to be used on all platforms. You could then add a template for TCP communication for the most popular languages (FPC, Delphi and Oxygene) to make it easier for developers to focus on the ai.

    We talked a bit about this form of competition a while ago in the next PGD Challenge thread. Some of us were interested and some were not. Personally I find ai interesting and would be up for such a competition. If there is enough interest in it, I may try and create a simple ai game this summer which we can use for such a competition.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  6. #6
    If you want to be complicated, you can use TCP. But as i said before, you can make applications communicate with eachother in console. Readln(), Writeln() and maybe Flush() are all that are needed for the bots. I assume most pascal based languages can read and write to system console?

    The game host application may need some process threading, or other fancy thing i haven't experimented with much. TProcess class on fpc?

    And of course the consoles themselves can be hidden from the user, so the communication is invisible.
    Last edited by User137; 21-03-2013 at 03:18 PM.

  7. #7
    Quote Originally Posted by User137 View Post
    If you want to be complicated, you can use TCP. But as i said before, you can make applications communicate with eachother in console. Readln(), Writeln() and maybe Flush() are all that are needed for the bots. I assume most pascal based languages can read and write to system console?

    The game host application may need some process threading, or other fancy thing i haven't experimented with much. TProcess class on fpc?

    And of course the consoles themselves can be hidden from the user, so the communication is invisible.
    Hm, so maybe bots could just be CLI Pascal programs communicating with the server over a pipe? That sounds farily doable. The server could have a nice 3D view (so it can be recorded to a movie), and it opens all bots using a list of file names, communicating with some predetermined commands.

    Each bot probably should be limited in how many commands it can send per second, or at least what actions it can take. There should be some time from a command until you get a result (so if you ask the bot to "look" it takes some time until you "see" something).

    Sounds fun.

  8. #8
    Well I don't know if I would call it complicated. It depends on what socket libraries are available. Personally I use Oxygene for Java so that is quite easy, but I haven't used FPC or Delphi in a long time, so I don't know what kind of support they have.
    Yes it is possible to use readln and writeln. As I see it, it really depends on what sort of data you want to send and how good a socket library you have available. But I suppose it would be nice debug feature, if a bots console output could be shown during testing. In the end, it depends on who is making the game and what that person prefers. IMO that person would also have to provide a template for each pascal dialect, so that contestants don't have to write the functions for communication with the server, but they only have to focus on writing the ai. Ideally the would only need to implement one method:
    Code:
    procedure TBot.DoMove(FGame: TGameMetrics);
    begin
    ...
    SendCommand(...);
    end;
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  9. #9
    Quote Originally Posted by pstudio View Post
    Well I don't know if I would call it complicated. It depends on what socket libraries are available. Personally I use Oxygene for Java so that is quite easy, but I haven't used FPC or Delphi in a long time, so I don't know what kind of support they have.
    Yes it is possible to use readln and writeln. As I see it, it really depends on what sort of data you want to send and how good a socket library you have available. But I suppose it would be nice debug feature, if a bots console output could be shown during testing. In the end, it depends on who is making the game and what that person prefers. IMO that person would also have to provide a template for each pascal dialect, so that contestants don't have to write the functions for communication with the server, but they only have to focus on writing the ai. Ideally the would only need to implement one method:
    Code:
    procedure TBot.DoMove(FGame: TGameMetrics);
    begin
    ...
    SendCommand(...);
    end;
    There are some complications, and you hint a bit about some of them: A common, portable interface has to be written if there isn't one already. And it has to be suitable for the problem.

    But the big complications are in setup and performance. I would say that performance is the biggest issue. If my client runs from my computer and connects to a common server, how do we know that the competition is fair? What if I get a different netlag than others? If the game is turn-based that is not quite as much a problem, except if the game gives up on a slow connection and ignores its commands because they are too late.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •