Jump to content

  • Log In with Google      Sign In   
  • Create Account


How to weaken 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
8 replies to this topic

#1 cryo75   Members   -  Reputation: 143

Like
0Likes
Like

Posted 25 March 2013 - 07:54 AM

What is a good way to weaken an AI's strength when using Negascout?

 

1. Decrease search depth

2. Apply noise to the evaluation score

3. Reduce the number of generated moves



Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 12899

Like
1Likes
Like

Posted 25 March 2013 - 09:05 AM

I like the first two. Some chess programs play well most moves and introduce an occasional blunder on purpose. I guess reducing the number of generated moves occasionally would be a way to implement this. But you should make sure that the program doesn't miss obvious moves that no human would miss (like recapturing a queen in chess).

#3 ByteTroll   Crossbones+   -  Reputation: 1307

Like
0Likes
Like

Posted 25 March 2013 - 10:43 AM

Decreasing the search depth would be a great way to weaken the Ai.

Alvaro is also correct - decreasing the number of generated moves would work, but you want to make sure that you don't miss obvious moves. You might also try forcing the Ai to make a stupid move once every few turns, giving the appearance that the Ai is weaker.
▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬
I see the future in 1's and 0's
▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬

"This is called programming. The art of typing shit into an editor/IDE is not programming, it's basically data entry. The part that makes a programmer a programmer is their problem solving skills." - Serapth

#4 Druzil   Members   -  Reputation: 585

Like
0Likes
Like

Posted 25 March 2013 - 08:12 PM

Another possibility is to reduce the features in your evaluation function

e.g. In chess a new player probably wouldn't understand concepts like passed pawns and outposts whereas a more advanced player would



#5 Álvaro   Crossbones+   -  Reputation: 12899

Like
0Likes
Like

Posted 26 March 2013 - 01:38 AM

Another possibility is to reduce the features in your evaluation function
e.g. In chess a new player probably wouldn't understand concepts like passed pawns and outposts whereas a more advanced player would

A similar idea is to use bad parameters in the evaluation function, so the relative strength of different features is not correctly taken into account. What makes this particularly interesting is that you can create odd personalities for your program: One that really likes to push pawns forward, one that is obsessed with having its own king protected, one that is vicious in attacking the opponent's king... while they disregard other considerations.

#6 Dawoodoz   Members   -  Reputation: 294

Like
0Likes
Like

Posted 04 April 2013 - 06:42 AM

The most important thing to keep the game interesting is random behaviours. Decreasing search depth is just a way to speed up the calculations.


My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#7 IADaveMark   Moderators   -  Reputation: 2403

Like
1Likes
Like

Posted 04 April 2013 - 03:01 PM

The best of both worlds is weighted randoms. If you rank your potential actions based on some sort of score, size the potential for selection based on the relative scores, then throw a random number at it, you get a variety of reasonable looking behaviors with a diminishing chance for the very stupid ones. e.g.

 

  • Best Choice 50%
  • Good Choice 25%
  • OK Choice 15%
  • Dumb Choice 8%
  • Ridiculous Choice 2%

Assume the numbers above were generated by comparing their favorability. If you throw a random number at that, most of the time you are going to get one of the top 2 selections. However, sometimes you will get the less than preferable ones and that will mix things up a bit.

 

You could actually do this with minmax trees by simply not picking the highest scoring branch and, instead, using the scores to seed your weighted randoms.


Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#8 Druzil   Members   -  Reputation: 585

Like
0Likes
Like

Posted 07 April 2013 - 04:46 PM

The best of both worlds is weighted randoms. If you rank your potential actions based on some sort of score, size the potential for selection based on the relative scores, then throw a random number at it, you get a variety of reasonable looking behaviors with a diminishing chance for the very stupid ones. e.g.

 

  • Best Choice 50%
  • Good Choice 25%
  • OK Choice 15%
  • Dumb Choice 8%
  • Ridiculous Choice 2%

Assume the numbers above were generated by comparing their favorability. If you throw a random number at that, most of the time you are going to get one of the top 2 selections. However, sometimes you will get the less than preferable ones and that will mix things up a bit.

 

You could actually do this with minmax trees by simply not picking the highest scoring branch and, instead, using the scores to seed your weighted randoms.

 

Whilst this works with just straight minimax, it fails once you start implementing even simple search enhancements. i.e. it would be doubtfully useful with alphabeta and most likely useless with PVS



#9 Luckless   Crossbones+   -  Reputation: 1765

Like
0Likes
Like

Posted 11 April 2013 - 02:41 PM

Depending on exact usage you can also consider the impact of a goal/target based AI approach. Advanced AI would favour higher level goals in a game, such as attacking economies, feints and lures, and other similar options, where as a lower level AI is going to be focused more on simple attacks and reactions. 

 

How to modify your AI for challenge level depends on the exact style of gameplay after all. 


Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.




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