News: 11 March 2016 - Forum Rules

Author Topic: Captain Tsubasa II NES ?  (Read 1170 times)

shadow501

  • Full Member
  • ***
  • Posts: 225
  • Modder
    • View Profile
Captain Tsubasa II NES ?
« on: October 21, 2021, 06:01:09 am »
Hello  :)

I Wonder if any guides or tips for make 1P to COM vs COM, How is make team to COM ?

Any advice or guidance would be greatly appreciated.

FAST6191

  • Hero Member
  • *****
  • Posts: 3358
    • View Profile
Re: Captain Tsubasa II NES ?
« Reply #1 on: October 21, 2021, 07:53:27 am »
Might want to make a better title next time.

Never played the game but can give a general overview here.

For fighting games and driving games then generally if you can set the opposing player to AI for say a player vs CPU match but also change the controller (think player 2 presses start and what would normally be player one then becomes CPU) then that is how those tend to come about. Somewhere in there will be a little flag that says this player controlled by CPU. The normal menu might not allow two CPU players but someone with cheat cartridges might even be able to do something here, indeed start the same game (level, characters selected, settings...) but with the difference being what was originally a 2 player match is now an AI, then load an older savestate back on the menu and make it 2 player again, then compare to see what changed, now AI again, you can even load 2p or AI a couple of times in a row and see what stayed the same to eliminate some other things. You can also try changing between 2p and ai in any menu if that is a thing.

Alternatively if there is a demo mode/screensaver type thing where leaving it on the start screen for long enough then you might get something there. Sometimes though it will just be a sequence of inputs to play back rather than any kind of true AI.

After this then you start to get into hacking proper. If you can you want to see if you can use the existing AI routines to control two players at once, which might be hard if it is going to try to use the same memory locations. If it is going to be tricky then you either get to sort those conflicts, duplicate the existing code, try to subvert say normal single player AI that handles enemies or straight up write your own (usually on the harder side but for NES stuff you are probably going to have fairly weak AI anyway).
As far as finding AI routines. Usually not so hard -- something is going to move a sprite on screen or cause another one to be displayed, the AI routine will have been what caused that so go follow that back up the line.

Curveball option. Plenty of people have taught external AIs to play games, even things as complicated as Super Smash Brothers where it was beating world class players. You could do something here and rather than leverage the console to play you could instead have an AI posing as player one play against the internal AI*.
https://github.com/m-star18/super-mario-bros-ai https://www.youtube.com/playlist?list=PLrUdxfaFpuuLyYmu__kWChp_F0weDD6yj https://towardsdatascience.com/teaching-ai-to-play-super-mario-land-genetic-algorithm-dde42c814e16 and possibly https://www.youtube.com/c/PrimerLearning/videos being choice links there.

*you might want to make some cheats so someone has infinite health, time or whatever is going to stop long periods of play, possibly also set up savestates so you don't have to fiddle with menus.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7261
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Captain Tsubasa II NES ?
« Reply #2 on: October 21, 2021, 01:06:21 pm »
Probably lots of ASM hacks.

The sort of thing where if you have to ask for "guides or tips", it's probably above your level.

Sure you could attempt to look for a flag that distinguishes a human 2P from CPU 2P, and see if it can be applied to the 1P side as well, but I would not expect it.
Certainly not fully functional behavior (much like the reverse direction of the brief days of the original SNES SF2 when people wanted codes to play as the bosses. They want a feature that might be dependent on some code that just isn't there.)
"My watch says 30 chickens" Google, 2018

shadow501

  • Full Member
  • ***
  • Posts: 225
  • Modder
    • View Profile
Re: Captain Tsubasa II NES ?
« Reply #3 on: October 24, 2021, 12:10:49 pm »
Captain Tsubasa II, it is too difficult to make 1P to AI COM....

Contra AI Player in Snow Stage but he is not move ?

https://youtu.be/KTRWdO_k3v0

FAST6191

  • Hero Member
  • *****
  • Posts: 3358
    • View Profile
Re: Captain Tsubasa II NES ?
« Reply #4 on: October 24, 2021, 01:48:25 pm »
What did you try to figure out that it is too difficult?

What does that video show? That could be anything from the "AI learns to play Mario" but for Contra.
https://www.youtube.com/watch?v=CI3FRsSAa_U
to someone trying to code an AI in normal programming styles
to AI from single player's second player
to someone tried to use the inputs from demo mode you get when you leave it on the title screen too long and it was for a different level.

For my money it looks like early stage of someone trying to do one of the first two but who knows.

shadow501

  • Full Member
  • ***
  • Posts: 225
  • Modder
    • View Profile
Re: Captain Tsubasa II NES ?
« Reply #5 on: October 25, 2021, 06:12:00 am »
What did you try to figure out that it is too difficult?

What does that video show? That could be anything from the "AI learns to play Mario" but for Contra.
https://www.youtube.com/watch?v=CI3FRsSAa_U
to someone trying to code an AI in normal programming styles
to AI from single player's second player
to someone tried to use the inputs from demo mode you get when you leave it on the title screen too long and it was for a different level.

For my money it looks like early stage of someone trying to do one of the first two but who knows.

I need learn python to know AI, But it is difficult for me  ;D