Character AI implemented in "Kake Street" that Mr. Omorida talks about: Game AI Technology History Vol.3

What is "Megumi Street"?

This is a board game devised by Yuji Horii, a familiar family computer software released by ASCII in 1991 and in the Dragon Quest series.While swinging the dice, as the number of eyes came out, the players who purchased stores and stocks to increase their assets, increased their assets quickly to the target amount set for each map, and returned to the starting point.It will be a victory.Up to four players can play at the same time, and if the player is less than four, the CPU character will participate.

If you purchase a store on the map, you can get "shopping money", that is, every time other player stops.Conversely, if you stop at a store owned by other players, you will pay the other player.

The store you purchased will increase the value of the store by increasing the capital, and it is possible to pay when other players stop or increase the amount of money when selling the store.Also, if you purchase an area stock at a bank, you can make more money by raising stocks by increasing the store in that area.

From the sequel to Super Nintendo software, "Kake Street 2", Enix has been the publisher, and the Square Enix is still released by Square Enix.

A total of seven CPU characters appearing in "Makee Street" (hereinafter, "Ita Street").Some characters have solid play styles that avoid risks as much as possible, and some attack -type characters use all means for victory, so they have different personality, so they can enjoy it alone.

In "Ito Strike", which just celebrated its 30th anniversary in March this year, how did you make AI to give different individuality for each character?

Developed AI program using logarithms that can be moved even with weak hardware

—— Thank you for today.Could you tell us from the reason Omorita -san decided to participate in the development of "Ita Strike"?

Mr. Omorita (hereinafter referred to as Omorita): Endo (Masanobu) of the game studio said, "I'm looking for a programmer, but I can't get it in the game studio, so can you take it?"That's the trigger.

——Who was the main development staff of “Ida Strike” besides Mr. Omorita?

Omorita: The producer was Gozo Shiozaki, the editor -in -chief of "NES Telecommunications".There were YANAKEN (Kenji Yanagisawa) and Tsuneo Matsumoto, president of Caramel Mama, who became a model of Karamel Mama's president of "Dragon Ball".The project is Horii, the illustration is Kiyokazu Arai, and the sound is Gesen Ueno (Toshiyuki).I was the only programmer, but finally Endo helped me as a pinch hitter.

——Did you go to ASCII's office to create a program?

Omorita: Basically, I was working at home, but after getting busy, I had ASCII prepared a seat.You just worked with Sonobe (Hiroyuki) and lined up your desks.

——What kind of PCs and development equipment did you use?

Omorita: Because it is a NES software, there was no need for large -scale development equipment.At that time, I think that I wrote a program on PC-9801, compile it, burned it on ROM and checked it.

—— At that time, I think there was already an ICE (In-Circuit Emulator) for NES software development, but I didn't use ICE.

Omorita: There was no ICE, but if you transfer data to RAM on the way, you can use RAM as a substitute for ROM, so I think that the work efficiency has improved.

——The CPU characters that appear in “Ida Strike” are all seven, and each seems to have different personality.Who decided on each personality and settings?

Omorita: I decided.The character designed by Arai was very standing, so I made it while imagining the picture, "Because it looks like this, it will be like this."For example, there is a rule in the game "5 times buying" ( *), but this is not easy for ordinary people to challenge.Therefore, I also put a program that forcibly "5 times buying" in the Ikeike -style sister character called "Kikyo Mizusawa".In short, the CPU could play the role of the tutorial.

※「5倍買い」:自分以外のプレイヤーが保有する店に止まったときに、お店の5倍の金額を払って店を買収する行為。主に、特定のプレイヤーが同一エリアの店の独占を阻止する際に用いられる。

—— How long did it take to complete the game after the development started?

Omorita: The development period was long and it took about three years.All the staff except me were close friends, and Mr. Shiozaki made it while holding a planning meeting every Saturday night, but I think Horii -san made it mainly.It seems that the finished form was drawn from the beginning in Mr. Horii's head, and when I consulted, "What do you do here?" Or "What do you do?"You completed the specification and brought me.

——Did the CPU character AI and thinking routine at the end checked and issued OK?

Omorita: That's right.I actually played it, and I didn't complain, so I made it because I thought it would be OK.At that time, no one knew about AI yet, and it was an era of "How to make AI?"It is made based on research.

——In the first place, Mr. Horii planned the “Ita Strike” was a great place to inspired by “Monopoly”, right?

Omorita: Yes.In "Ida Street", a map of the American continent appears, but the first completed map was exactly the United States.From that point on, the development was difficult, so I tried to make a game on PC-9801 Basic and worked on it while repeating it.Horii -san's staff had few experienced games in the past, so they were developing while actually seeing what I made.

—— How long was the AI program production period?

Omorita: I made it in about 6 months, and then fix it little by little while playing myself and completed it.When I was playing on my own, it took a lot of time because there were many parts of "I want to fix this a little".

Also, the most interesting thing was that there was a time when I lost my way to see if the game called "Ita Street" was a really interesting game.However, when I started playing one day, I realized that this was surprisingly interesting, and I was confident that this was okay.

Until I was confident, it was a game screen that I watched repeatedly many times, so I wasn't very confident that others looked really interesting, but it became fun while playing myself.Don't go with this.

—— So how long did you spend on debugging and test play?

Omorita: I don't think we did so much debugging.Certainly, I think that I had been debugging in a form of reporting and fixing if I found a problem while the related staff was playing, but I don't have much memory.I myself had been playing for a long time, and since I was in Namco ( *), my program had a reputation for having few bugs (laughs).

※筆者補足:大森田氏は、かつてナムコでMSX版『キング&バルーン』や、ファミコン版『ギャラガ』などのプログラムを担当していた。

——What is the program that CPU characters determine their own actions?

Omorita: For example, if there is still a store that no one has bought, it will give priority to buying a store, but as you proceed with the game, expensive properties will appear, so if you have expensive properties.If you come, you will give priority to going to a place where you can pass there.If you go from the opposite direction of a high -priced property, there is a possibility that it will stop there in the next turn.

In other words, in order to take a strategy to take as much as possible, we have a formula to determine which one to prioritize, and then calculate it in the program.

—— What kind of calculations do that formal formula do?

Omorita: 8 -bit can be calculated with NES CPU, and it is hard to calculate, so it is hard to calculate anyway and it takes time.Therefore, there are 8 -bit logarithmic table to make the calculation easier.If you use logarithm, the multiplication will be added, so it will be very easy to calculate, and the large and small relationship will be maintained properly.But originally, the logarithm has to be returned to the original number, but in fact we only performed large and small comparison checks without returning the original, so we can only calculate roughly.

——Is the 8 -bit hardware like NES, was the constraint strict?

Omorita: Yes.The capacity was not so large, and it was strict that I could only calculate 8 -bit anyway.If I used Z80 for the CPU, I could do up to 16 -bit adjustment, but I used it for the NES CPU, which was a complete 8 -bit 6502, so if I tried to calculate 16 -bit, I would clock.I had to use a lot, so I had to avoid it.Certainly, NES is 1.At 7 MHz, it was a specification that had to be terminated one set in one -sixth second, so it was quite difficult to devise so that it can be calculated within that range.

Adjust the expected value of income and expenditure to create the individuality of the CPU character

—— How did you adjust the character and characteristics of each CPU character?

Omorita: Basically, I made a formula first and finished it later.Once you have a formula, you can get the personality of each character just by changing the parameter.The basics are mathematical formulas, but for example, there are some parts that cannot be calculated, such as buying and selling stocks, so in such a case, they imitate a human player.

——Did you have a program that imitates the player's actions during the game?

Omorita: No.Rather, during the development I saw another person's play and made a program itself that made the same way as that person.

大森田不可止氏が語る『いただきストリート』に実装されたキャラクターAI:懐ゲーから辿るゲームAI技術史vol.3

——When making AI, you need to be more human because you will fail if you try to make it too strong, right?

Omorita: When trying to make the most balanced character, everyone would have similar actions, so I managed to remove it.One of the examples of buying 5 times the "Keiko" I talked about was an example.In the "Megumi Street", the balanced play is the strongest play, but even if it comes off a little, there are some aspects that are surprisingly backfires.For example, if you buy a stock that has nothing to do with it, you may happen to rise later.

—— For example, if you stop at a chance of a chance and draw a card, your luck will suddenly increase or decrease with your luck.

Omorita: Yes.I think the program was formed to play with a high degree of freedom.When everyone has the same personality, it's not interesting to play.I played the most, so I'm making it properly so that I play and make it interesting (laughs)

—— Have you received any opinions and improvements from other staff for AI?

Omorita: Nobody could imagine how AI was moving, and there were not many opinions.Regarding AI, I was making it quite freely.

——By the way, did Omorita studied AI when he was a student?

Omorita: You didn't do that much.When I was a student, it was just a time when the neural network was attracting attention in the second AI boom, so I read some related books, but since the computer is still a weak era, the environment I can actually try.There was no at all.

—— So, from that time, you have been interested in AI itself?

Omorita: That's right.I was studying though it was thin.In that era, genetic programming was hardly achieved, but it seems that it was an interesting era because various experimental programs became popular.

—— I think that what evolved from the neural network will be a deep -planning, but did you make AI to learn that you will be stronger every time you repeat the match?

Omorita: I thought a little, but I couldn't implement it so much in the performance of NES.It is possible to accumulate various experiences in the backup RAM itself, but the capacity was only about 2 kilobytes, so I just remembered the last phase (laughs).But at that time, I think it was a big thing that I was able to play that hardware.

—— Was it impossible to implement AI to learn even with the turbo file ( *)?

Omorita: Then, there is a problem that the development becomes very difficult.If the program is a learning type, the debugging will be particularly difficult, and if you want to complete it, you will need a lot of effort and spirit.Debugs will be difficult if you prepare things that happen only occasionally.

It was a simulation game created by a company I knew, and it seems that there was a problem that it did not occur in debugging once if I put an event that rarely appeared."Is it really working?" (Laughs).When creating a program, it will be difficult because you have to think so much.

※ターボファイル:アスキーが発売していたファミコン用データレコーダーのこと。乾電池による駆動で、対応するタイトルのプレイデータをセーブすることができた。

——What are the most devised points in the AI program in “Ita Strike”?

Omorita: After all, logarithm is the best key.I can't do it even if I want to multiply, so I'm going to faint with the numbers ... (bitter smile).

—— After the launch of the software, how was your reputation in the industry and the industry about the AI program of “Ita Strike”?

Omorita: I've never heard of it, but everyone said, "Don't think and act."

—— Later, Mr. Omorita will also make a CPU character AI with the Super Nintendo version of “Monopoly” ( * released from Tommy in 1993), but the experience gained from the “Ida Strike” program is also used here.Was it done?

Omorita: Yes.It took three years to develop "Ita Strike", but "Monopoly" was completed in three months because it had been studying for a long time (laughs).

——In “II strike”, you can also auction the store held by the player at any time, or negotiate with other players to exchange stores, right?

Omorita: Basically, there are income expected and payment expectations, and the former is as large as possible, and the latter is a program that calculates to make it as small as possible, so in the case of replacement of properties.It is a Juz that you judge after seeing how the expected value changes before and after replacement.

——In the end of the game, it seems that the losing CPU characters may set a game or a bee in a way such as exchanging stores so that the opponent dares to be advantageous, but this is also a program in advance.Was it?

Omorita: Yes.It may have been doing that too.I feel that there was a program that the expected payment value would increase, but when I was losing, I had to take some risks.In short, it's like a shogi game.However, the logarithm of the 8 -bit is very low accuracy, so it was not possible that it happened to happen because of the low accuracy (bitter smile) ...

—— If you set the participating players to 0 people, you can study rules while watching the game where only CPU characters participate, right?Did you have a plan to prepare a watching mode that also serves as a tutorial from the planning stage?

Omorita: No.It is a programmer play.I came up with the idea, "Oh, you can do this," so I just made it, "Well, do it," (laughs).

—— Maybe 0 players were originally made for debugging in the product version as they were?

Omorita: No.There was no idea so far.During the debugging, I had to look at the screen all the time, so it was easier to play myself.

Reasons for devising the AI program other than the adjustment of the CPU character

—— Did you not think about implementing a function that players can set arbitrarily, such as “strong”, “normal”, “weak,” at the start of the game?

Omorita: That was not the case.I just made a CPU that I could play properly with my personality, and I couldn't turn it up to that point.There are seven characters in all, so I wondered if it would be easy to or on the contrary depending on the combination.

"Ika Street" is a game where the dice eyes have a significant effect, and if good eyes continue to appear, even weak characters can sometimes win, so I think it was interesting in this regard.

——Do the dice outlines vary depending on the CPU character?

Omorita: I'm not messing with the dice at all.The last waved eye data is made to save, so even if you turn off the power and start over, the same eyes will come out again.Other than that, basically, the player updates the random number while waiting for the turn, so the eyes change depending on the timing of pressing the button, but it does not transmit it.。In other words, the sloppy sloppy is a program that does not do anything.

—— Is there any part that you want to refer to in the AI program of “Ida Strike” for active programmers?

Omorita: I made it for a long time, so I have a lot of attachment, but my hardware is too different from now ...NES has 8 bits and only 3 registers, but now the PC has 32 registers, so you can do 64 -bit floating point operations with 1 clock.

However, I think there are various ideas for making the game interesting.Even if the CPU's ability is improved, I feel that the parts that are devised about the game have not changed so much.It is interesting that "Ika Street" happens while playing, so how to strengthen the CPU character, it is not easy to do it.I was really thinking about making my own program.If you remake an old game like "Ita Strike" with the current machine power, it will be more interesting.I think the AI is already quite clever in the current "II Street" series.

—— Can you explain in detail the points to make the game interesting?

Omorita: Actually, there are various parts other than AI, but for example, the screen is divided.In "Ita Street", the screen is divided, but the hardware is not posted.Normally, a timer tip is put on, but the screen is divided by force, so if the AI process becomes heavy, the screen split may sometimes be disrupted.

——Narhod.If you don't make AI programs well, you'll have any problems elsewhere.

Omorita: Then, when I asked Arai for an illustration, I said, "I can use up to four colors for NES," so Arai -san uses one different color from the background.I drew it.However, since I had you draw it, I was thinking about displaying five colors somehow.

So, I came up with a way to use sprite as a patch in the smallest area of the five colors.For example, if red is the smallest area, you use a sprite to make red.So, based on the illustration, we have created a program that calculates which color area is the smallest (laughs).

However, if the area of the sprite increases, the color of the lower screen will be insufficient, and the splite will be borrowed alone, so the color of the map will be flickering.Ten.However, the player's eyes would be on the top, that is, the character, so I thought they would probably not notice.But some people noticed later ...Well, in the performance of the NES, there were some aspects that had to close their eyes.

——It was a great deal in detail.

Omorita: Because the screen is divided, it was hard because we had to finish all processing before dividing.I had time, so I was making various elaborate processing.

—— Maybe a game like “Ita Street” can be even stronger if you collect play data online?

Omorita: That's right.If it's a "strike", online implementation doesn't seem to be so difficult, and you may be able to make AI today.I think it was just right to have seven CPU characters, but I think it would be possible to increase the number of people and give them individuality.

At the time of "Monopoly", about 30 CPU characters were created, but there were two people who modeled real players, and if they always program the settings to compete, they would compete in the game properly.It was interesting because it moved.

Interview / sentence / Shigihara Moriyuki

© Armor Project/ Kadokawa Corporation

Related Articles