Jump to content
  • Advertisement
Sign in to follow this  
Q8Xbox

NES AI: Captain Tsubasa Vol. II. How it works ?

This topic is 850 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello,

 

 

I would like to know more about How Captain Tsubasa Vol. II AI works so i would like someone to guide me through this to learn more about AI and Game Programming ?

 

What is Captain Tsubasa Vol. II:

it is a continuation of the "Cinematic Soccer" series of games started on the Famicom. Released in 1990 byTecmo this game is fairly similar to its predecessor but with some slight graphical improvements. It was also the last Tsubasa game to be released on the Family Computer with the series moving to the Super Famicom two years later.

 

Game Reference:

 

Player Properties:

    - Stats

           Stamina, Dribble, Pass, Shoot, Tackle, Block, Cut.

    - High " when the ball of the ground ":

           Trap, Shoot, Thru, Clear, Compete.

    - Low " when the ball on the ground ":

           Trap, Shoot, Thru, Clear, Compete.

 

GoalKeeper Properties:

    - Stats 

           Stamina, Catch, Punch, Stop Dribble, Stop Shoot.

    - High " when the ball of the ground ":

           Jump.

    - Low " when the ball on the ground ":

           Jump.

 

Note: Each property will have it own point ( number ) where this point actually will be taken

from Stamina points that mean if the Stamina is zero point the player won't be a good benefit.

 

How The Game Works:

    First Case: When you face an opponent player on the ground and you have the ball

           you will face him with 4 options: Dribble, Pass, Shoot, 1-2 Pass.

    Second Case: When you face an opponent player of the ground and you have the ball

           you will face him with 4 options: Trap, Pass, Shoot, Thru.

    - Third Case: When you face an opponent player on the ground and he has the ball

           you will face him with 4 options: Tackle, Pass Cut, Block, Wait.

    - Fourth Case: When you face an opponent player of the ground and he has the ball

           you will face him with 4 options: Mark, Pass Cut, Clear, Wait.

 

What Is The Questions:

    1) When the player have the ball and Shoot directly to the goalkeeper How we can manage

         to know if the goalkeeper will catch the ball or not ?

     2) In all Cases How we can manage to know if the player will overcome the opponent player or not

          For example when the player face opponent on the ground and you have the ball and choice to

          Dribble where the opponent choice to Tackle i don't thing only point for each choice alone will determent

          wither you bypass the opponent or the opponent will take the ball from you ?

 

 

I need some one to explain to me in details how i can manage to solve this problems and i will try my best to

do this steps in actual game work using Adobe Animate as starter to understand how things work.

 

 

Regards,

Fahad S. Aldaferi

Edited by Q8Xbox

Share this post


Link to post
Share on other sites
Advertisement

I don't see any artificial intelligence in the video.

 

The simplest form is to decide everywhere is to draw a random number between 0 and 1. If it's lower than 0.5, A wins, else B wins.

I would start with this, you can make much of the game, then decide if it is good enough.

 

If you want to give a player different weights (that is, better or worse player), use wA/(wA + wB) instead of 0.5, where "wA" is the weight of A, and "wB" is the weight of B. If wA == wB, you'll end up with 0.5 again, which you expect if two players of equal strength meet. If A is better (wA > wB), then wA/(wA + wB) > 0.5, so A gets an advantage.

Share this post


Link to post
Share on other sites

I don't see any artificial intelligence in the video.

 

The simplest form is to decide everywhere is to draw a random number between 0 and 1. If it's lower than 0.5, A wins, else B wins.

I would start with this, you can make much of the game, then decide if it is good enough.

 

If you want to give a player different weights (that is, better or worse player), use wA/(wA + wB) instead of 0.5, where "wA" is the weight of A, and "wB" is the weight of B. If wA == wB, you'll end up with 0.5 again, which you expect if two players of equal strength meet. If A is better (wA > wB), then wA/(wA + wB) > 0.5, so A gets an advantage.

 

Okay, working with a random number between 0 and 1. Let's say i have a powerful player like Tsubasa Oozora face an normal opponent player name Amaral in this case there is a chance %50 that the opponent Amaral win the ball and i think it is wrong from my point of view. The same goes if i add player weights so there must be some property or equivalent will effect and give fair result. Please be patient with me because I am a little confused now.

 

Tsubasa Oozora Properties:

    - Stats

           Stamina ( Max Guts ): 748, Dribble: 16, Pass: 14, Shoot: 12, Tackle: 12, Block: 11, Cut: 12.

    - High " when the ball of the ground ":

           Trap: 11, Shoot: 13, Thru: 15, Clear: 11, Compete: 13.

    - Low " when the ball on the ground ":

           Trap: 11, Shoot: 13, Thru: 15, Clear: 11, Compete: 13.

 

Amaral Properties:

    - Stats

           Stamina ( Max Guts ): 400, Dribble: 9, Pass: 9, Shoot: 9, Tackle: 10, Block: 9, Cut: 10.

    - High " when the ball of the ground ":

           Trap: 11, Shoot: 12, Thru: 12, Clear: 12, Compete: 13.

    - Low " when the ball on the ground ":

           Trap: 8, Shoot: 9, Thru: 9, Clear: 9, Compete: 10.

Edited by Q8Xbox

Share this post


Link to post
Share on other sites
Okay, working with a random number between 0 and 1. Let's say i have a powerful player like Tsubasa Oozora face an normal opponent player name Amaral in this case there is a chance %50 that the opponent Amaral win the ball and i think it is wrong from my point of view.

I agree things are off-balance then.

 

So what is fair then? Powerful player against normal player, how often does powerful player win? 50%, 60%, 90%, 100% ?

If the powerful player wins too often, it is boring. If he wins too few, he doesn't feel powerful.

Making these judgement calls on paper is very hard.

 

In my opinion, these chances are best judged by programming them and then play a few games.

 

This is what I proposed. Sorry if I was not clear.

 

 

 

The steps are thus:

 

1. Code the game, but with wrong chances.

2. Fix the chances by test-playing the game.

 

which results in something like

 

1. Just pick a chance as temporary solution, it doesn't matter, 50% or 70% or 100%, just any number.

2. Code the entire game, all visual displays, all actions that the player can do, all choices, and so on.

3. Play 10 games (maybe more).

4. Is the result what you expect? If so, you're done.

5. What is too weak? What is too string strong?

6. Change the chances to something better

7. go to 3  (try again)

 

Have fun! :)

 

 

Edit: Typo fix

Edited by Alberth

Share this post


Link to post
Share on other sites

I would use a task based system and use standard board game type decisions.

 

Implement a function

bool TaskSuccess(int attack,int defend);

Use that for everything, then you can alter it later and your changes will propagate throughout the game.

 

Start with with a simple formula. Something like ..

bool TaskSuccess(int attack,int defend)
{
       return ( ((attack-defend)+Random(-3,3)) > 0);
}

Then if the gamer choose to dribble past the defender you would just do ...

if (TaskSuccess(player1.Dribble,player2.Tackle))
{
      // success
}else{
     // fail
}

This could also be the heart of your AI. You just call the same function with all the options and build a list of ones that succeed, then randomly pick one of them.

 

Because of the random number in the decision variable, you would still get an ai as good as the average international soccer player.

Edited by Stainless

Share this post


Link to post
Share on other sites

Thanks Alberth & Stainless. I will do some test work than i will come back if i have some questions to ask.

 

Best Regards,

Edited by Q8Xbox

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!