Artificial Intelligence

RespireGamesRespireGames Member Posts: 71
edited November -1 in Working with GS (Mac)
How to Make Artificial Intelligence for football opponent?

Comments

  • AfterBurnettAfterBurnett Member Posts: 3,474
    What would you want to do that? THE ROBOTS WILL TAKE OVER THE EARTH!!!!!!
  • RespireGamesRespireGames Member Posts: 71
    No Really. How to make AI?
  • synthesissynthesis Member Posts: 1,693
    lots and lots and lots and lots and lots and lots and lots and lots of rules.
    its going to be a challenge.
  • sebmacflysebmacfly Member Posts: 1,018
    synthesis said:
    lots and lots and lots and lots and lots and lots and lots and lots of rules.
    its going to be a challenge.

    And a very slow game i think...
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Good, slower robots are easier to outrun.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    American football, or real football??
  • RiffelRiffel Member Posts: 1,272
    @JesterTN Im use magnitude sensors on actor rules, every decisions is a artificial decison and my actors perform it smart.
  • quantumsheepquantumsheep Member Posts: 8,188
    barkbark00 said:
    American football, or real football??

    You ROCK :D

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I knew one of you Brits/Europeans would chime in... ;-)
  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    AI can be pretty single minded and still be fun to try to overcome. It does not necessarily take too many rules. What you do have to do is to decide what AI you want to program.

    Do you want to have the opponent block you? Then a rule to make him move in front of you is all you really need.

    Do you want him to sneak ahead of you and arm a trap? That's more complicated.

    Start simple, and see if that provides good entertainment. It does not have to be overly complicated to be challenging.

    Hope this helps...
  • AfterBurnettAfterBurnett Member Posts: 3,474
    barkbark00 said:
    American football, or real football??

    You mean the football where there are MASSIVE, bone-crunching tackles and no one cries or the one where people pretend to hurt themselves and everyone cries... and take their shirts off... and cuddle shirtless... and pat each other on the bum?
  • AfterBurnettAfterBurnett Member Posts: 3,474
    And before anyone makes a joke about the helmets and pads and American players being pussies... I think you'd want a LITTLE protection when being hit head on by a 400lb linebacker!
  • RespireGamesRespireGames Member Posts: 71
    I mean football with two players. One on one.
    How Air Soccer from Pedalagames http://gamesalad.com/forums/topic.php?id=8603

    Thanks)
  • chosenonestudioschosenonestudios Member Posts: 1,714
    barkbark00 said:
    American football, or real football??

    The Brits invented and first used "soccer" to mean football, around 200 years ago, Us Americans adopted it.... They changed their mind... Google it
  • RespireGamesRespireGames Member Posts: 71
    Thank you chosenonestudios for solution to the dispute with barkbark00, but anyone knows how to solve my problem??????
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    You would need to track the position of the 'ball' and have your Ai move to it every x seconds. You would also want to include that the AI cannot go over the halfway line so the above rule would need to be wrapped in a rule.

    i.e.

    1st off contrain the 'balls' x and y position to new attributes called something like ball_x and ball_y.

    Then you need a rule on your Opponent Actor

    if ball_x is < 240 (halfway landscape)
    Rule - Every 0.5 seconds, move to ball_x and ball_y or interpolate to ball_x and ball_y

    You'd need to play with timings to get the appropriate level of hardness required

    You would then need collide rules and will need to set things like density and restitution to get the feel right.

    Thats a rough idea and is one way you could achieve it, it doesnt mean its the best way.

    Hope thats enough to get you thinking and going :)

    You'll need to play with all of this,
    New rule on your
  • RespireGamesRespireGames Member Posts: 71
    beefy_clyro said:
    You would need to track the position of the 'ball' and have your Ai move to it every x seconds. You would also want to include that the AI cannot go over the halfway line so the above rule would need to be wrapped in a rule.

    i.e. Thanks)) I will try IT!!

    1st off contrain the 'balls' x and y position to new attributes called something like ball_x and ball_y.

    Then you need a rule on your Opponent Actor

    if ball_x is < 240 (halfway landscape)
    Rule - Every 0.5 seconds, move to ball_x and ball_y or interpolate to ball_x and ball_y

    You'd need to play with timings to get the appropriate level of hardness required

    You would then need collide rules and will need to set things like density and restitution to get the feel right.

    Thats a rough idea and is one way you could achieve it, it doesnt mean its the best way.

    Hope thats enough to get you thinking and going :)

    You'll need to play with all of this,
    New rule on your

  • GamexcbGamexcb Member Posts: 179
    Usually you have make a grid on paper. The grid is like a reference chart. On one side you have the possible situations and the other the actions it will do. Then add a little bit of randomness. Then you convert your chart into code. From it you will get "if then" statements or in GS's case "rules"
  • AfterBurnettAfterBurnett Member Posts: 3,474
    Oooh. nice tips.
  • AfterBurnettAfterBurnett Member Posts: 3,474
    And before QS jumps in... "that's what she said!"
  • ValanValan Member, BASIC Posts: 410
    Fun project.

    First I would think about what I do when I play the game. Really break it down into stages.

    When I cannot hit the ball I tend to follow the balls x position loosely. Looser the nearer it is to the opponent. Then I am in defense mode.

    When I am getting ready to hit the ball I follow the balls x position and wait until the ball enters a reachable area. An invisible actor may denote a reachable area.

    When I can hit the ball I tend to pull back(y axis) and then move quickly towards the ball's x,y axis to hit it.

    There is also anticipating rebounds. This may get into a math area I cannot go to.

    At first get a computer opponent who cannot be beaten. It always blocks the goal and hits the ball. Then loosen the timing so there is a little random delay. Play with different ways to follow the balls x position. Maybe use different methods for different parts of the pitch.

    You will never be finished but just define clearly what you want to get achieved.

    Hope this helps
Sign In or Register to comment.