Jump to content

  • Log In with Google      Sign In   
  • Create Account

Implementing Hockey Players AI ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 robert_loxy   Members   -  Reputation: 113

Like
0Likes
Like

Posted 15 January 2014 - 11:27 PM

I am developing ice hockey game on 'android platform' so i wanted to know what would be the best approach while implement the AI for the players.

 

I have knowledge of AI but at the mean time i dont know what would be the right option to implement the AI

 

The algorithm chosen or written should also consider the limitation of the mobile hardware and should also be robust enough that it looks like an AI ?

 

So i would really appreciate if someone can guide me to the right path. 



Sponsor:

#2 ferrous   Members   -  Reputation: 2013

Like
0Likes
Like

Posted 16 January 2014 - 02:22 PM

This is a shot in the dark, but you might want to do some searches on RoboCup Soccer?  Yes, it's soccer, so not exactly the same, but it's still very similar in that you have a team of players trying to bring an object to the goal, while avoiding defenders, etc.  



#3 robert_loxy   Members   -  Reputation: 113

Like
0Likes
Like

Posted 16 January 2014 - 11:20 PM

Hey Ferrous,

                   Firstly thnx for showing some direction 'RoboCup Soccer' looks interesting. Secondly why would you say its a shot in the dark ?

 

I have implemented the AI part but the use of AI word for it would be wrong in my perspective.

 

Basically i have 3 difficulties PRO,ROOKIE,EXPERT

 

My algorithm does is that it calculates all the player distance from the goal and sort it in increasing order. Now in

 

Pro = ball is passed to the 3rd person closest to the goal

Rookie = ball is passed to the 2nd person closest to the goal

Expert = ball is passed to the 1st person closest to the goal

 

and If team player has the ball i have coded 2-3 attacking formation they pick one and go for the attacking formation else all the player would go for tackling the ball from other team player.

 

Now you see this isnt AI, its just coded to look like an AI ..



#4 SimonForsman   Crossbones+   -  Reputation: 6111

Like
0Likes
Like

Posted 17 January 2014 - 01:15 AM

Hey Ferrous,

                   Firstly thnx for showing some direction 'RoboCup Soccer' looks interesting. Secondly why would you say its a shot in the dark ?

 

I have implemented the AI part but the use of AI word for it would be wrong in my perspective.

 

Basically i have 3 difficulties PRO,ROOKIE,EXPERT

 

My algorithm does is that it calculates all the player distance from the goal and sort it in increasing order. Now in

 

Pro = ball is passed to the 3rd person closest to the goal

Rookie = ball is passed to the 2nd person closest to the goal

Expert = ball is passed to the 1st person closest to the goal

 

and If team player has the ball i have coded 2-3 attacking formation they pick one and go for the attacking formation else all the player would go for tackling the ball from other team player.

 

Now you see this isnt AI, its just coded to look like an AI ..

;

That is what AI is, code that is written to appear intelligent :)

More complex rules and evaluation functions can improve the illusion but it will always be an illusion, even a learning AI is just an illusion, i.e, you can make your AI "learn" while playing by adjusting the odds of each attack formation based on how well the player counters it. (allthough it is quite rare for game AI to learn while playing as it has a tendency to make it difficult to adjust the games difficulty)


I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#5 robert_loxy   Members   -  Reputation: 113

Like
0Likes
Like

Posted 17 January 2014 - 01:38 AM

Hey Simon,

                 Thnx for giving me the motivation smile.png

 

i just wanted to have a professional approach with a proper agent toward the ai of players smile.png

 

Anyways Simon 

 

if i would have to implement this game in PC what are my possible options and how i should pick the best 1 ?


Edited by robert_loxy, 17 January 2014 - 01:45 AM.


#6 SimonForsman   Crossbones+   -  Reputation: 6111

Like
0Likes
Like

Posted 17 January 2014 - 11:14 AM

Hey Simon,

                 Thnx for giving me the motivation smile.png

 

i just wanted to have a professional approach with a proper agent toward the ai of players smile.png

 

Anyways Simon 

 

if i would have to implement this game in PC what are my possible options and how i should pick the best 1 ?

 

The options are unlimited, team sports are also very complicated.

 

Personally i would have each agent run its own AI no fixed attack patterns, each agent decides on his own actions based the value of that action. (you can add a bit of randomness to this but high value actions should be far more likely than lower value actions).

 

The hard part is evaluating the value of an action or location since there are so many factors that contribute to it in a game like hockey.

Basic actions would be:

Move to location, (locations could be evaluated based on their defensive, offensive and support values and the agents role)

Pass to location,

Pass to player (prefer unmarked players or players in strong offensive locations)

Shoot (distance, angle ?, goalkeeper location, friendly agents in better locations ?)

Tackle (Do we have support if we fail ? is the agents location weak enough to warrant the risk ?)

etc.

 

good evaluation functions and diverse actions will give a fairly good result.


Edited by SimonForsman, 17 January 2014 - 11:17 AM.

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#7 ferrous   Members   -  Reputation: 2013

Like
0Likes
Like

Posted 17 January 2014 - 12:27 PM

Hey Ferrous,

                   Firstly thnx for showing some direction 'RoboCup Soccer' looks interesting. Secondly why would you say its a shot in the dark ?

 

I have implemented the AI part but the use of AI word for it would be wrong in my perspective.

 

Basically i have 3 difficulties PRO,ROOKIE,EXPERT

 

My algorithm does is that it calculates all the player distance from the goal and sort it in increasing order. Now in

 

Pro = ball is passed to the 3rd person closest to the goal

Rookie = ball is passed to the 2nd person closest to the goal

Expert = ball is passed to the 1st person closest to the goal

 

and If team player has the ball i have coded 2-3 attacking formation they pick one and go for the attacking formation else all the player would go for tackling the ball from other team player.

 

Now you see this isnt AI, its just coded to look like an AI ..

 

Shot in the dark, as it's not something I've done myself=)  But yeah, what you have there is AI, for video games, that artificial part could also stand for fake, or perhaps simulated or mimicking.  It's not real intelligence by any means.



#8 robert_loxy   Members   -  Reputation: 113

Like
0Likes
Like

Posted 19 January 2014 - 11:17 PM

Hey Ferrous,

                    I also had the same idea that every player should run its own AI agent with evaluation function in it, so are you suggesting that i use heuristic functions to implement the AI ?

 

I just want to implement a good approach that the AI looks like an AI not a simulation or mimicking stuff :) 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS