Jump to content


Photo

New Stratego AI


  • Please log in to reply
31 replies to this topic

#1 Rick L

Rick L

    New Recruit

  • Members
  • Pip
  • 7 posts
  • Coat of arms
  • Bronze Spy

Posted 26 May 2018 - 06:38 PM

Yesterday I got on the Probe website and discovered that its AI is now built into a mobile/Windows app called Heroic Battle, which also has a multiplayer mode. They claim that this version of Probe is "new and improved." I tried it on my Android phone for a bunch of games, and I think it's true. I can still beat it most of the time, but I have to work a lot harder. It knows how to protect its flag and find mine, and does pretty well on exchanges. And no chasing!

 

Curious what others think.

 


  • TemplateRex likes this

#2 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 03 June 2018 - 09:49 PM

141-6

 

Just read this, I'm glad to hear someone mention it. I played a few hundred games or less. I don't have much to compare it to besides the stratego.vom ai but like anything mechanical, its predictable. I could explain the mechanics on how it thinks but I think the fun is figuring that out and then it becomes boring so I won't spoil it for some of you. The cool part to me is that you get achievements and there is a ranking. There was someone called 'dark wing in the top five and I asked Nortrom but he said it was not him. There are other stratego.com names I recognize so it would be neat to get a discussion on 'Heroic Battles' here. Thanks for the topic Rick L.



#3 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 03 June 2018 - 10:38 PM

So I just re downloaded it after not playing it for awhile. They upgraded the ai to the stratego ai three time world champion. It took me much longer to win than it used to. This is the most fun ai I have played yet.

Another handy thing with this app, it has a pass'n'play option. What a very convenient pocket Stratego board.
Play anywhere, anytime!

#4 GaryLShelton

GaryLShelton

    Flagbearer

  • Moderators
  • 5,348 posts
  • Coat of arms
  • Platinum Spy

Posted 04 June 2018 - 04:04 AM

 I tried it on my Android phone 

 

So it works for Android?  That's excellent!  Before, it never did and I always played Probe on my desktop computer.  Is it a free app on Android?



i77rs4m.jpg

The complete GS&F Rules can be found here: http://forum.strateg...rum-rules-2016/

Draw Refusal Rules, specifically, can be read here: http://forum.strateg...604#entry339604


#5 GaryLShelton

GaryLShelton

    Flagbearer

  • Moderators
  • 5,348 posts
  • Coat of arms
  • Platinum Spy

Posted 04 June 2018 - 06:14 AM

Okay, I just finished playing on the thing.  It's nice that it's on Android, that much is true.  And it does seem to play fairly intelligently.  But did you guys miss something?  The Two Squares Rule is messed up something fierce in Heroic Battles.  You can have a piece dead to rights with the 2s advantage and it blocks you after "chasing" that piece more than five times.  You get the message "It is illegal to continuously chase a piece that cannot be captured after 5 moves." 

 

!!!!!!!

 

Even though I am hardly one, I think it's safe to say that this rule alone will make the game unplayable for most skilled players.  There is no setting I found to correct this error in the programming.  Plus, for those who like accuracy the two squares rule for scouts is not programmed correctly either.  

 

The ONLY place this is programmed correctly is still here at good old stratego.com!

 

And for those who are really into the arcane, the description of movements possible in the game claim that a scout can move and attack in the same turn.  But this is completely wrong.  No piece can both move and attack in the same turn.  A turn for a piece is either an attack or it is a move.  But never both.  Scouts can attack at a distance, that's all.  They are not moving when they do this, only attacking.

 

For evidence of this I present Article 5.1 of the ISF rules:  

 

5.1 Preparation The pieces are set up on the four rows nearest to the player, one piece to each square, with the backs of the pieces facing the opponent. Red begins. A turn consists of either moving a piece or attacking an opponent‟s piece. (Emphasis added. gls)

 

 

That may be nitpicky to some but it's there in the rules.  Heroic Battles can claim not to be "stratego" and so have some excuse to ignore certain aspects of the rules, but if you are expecting it to play like an ISF rules game, be forewarned:  you'll be disappointed.

 

It was a bit annoying to have to tap on the last piece moved to move that same piece again.  


  • rgillis783 and TemplateRex like this

i77rs4m.jpg

The complete GS&F Rules can be found here: http://forum.strateg...rum-rules-2016/

Draw Refusal Rules, specifically, can be read here: http://forum.strateg...604#entry339604


#6 TemplateRex

TemplateRex

    Sergeant

  • Members
  • PipPipPipPipPipPip
  • 454 posts
  • Coat of arms
  • Silver Captain

Posted 04 June 2018 - 06:30 PM

I also noticed the 2 square rule bug. It’s weird because the old Probe windows program has a fully correct rules implementation.

I hereby grant explicit permission to all my opponents to record and publish my games as they see fit.


#7 GaryLShelton

GaryLShelton

    Flagbearer

  • Moderators
  • 5,348 posts
  • Coat of arms
  • Platinum Spy

Posted 04 June 2018 - 11:42 PM

I also noticed the 2 square rule bug. It’s weird because the old Probe windows program has a fully correct rules implementation.

 

 

Yes, Probe was fine for the Two Squares Rule for normal pieces.   I don't understand it either.  

 

I haven't actually tried the thing at Probe for the Two Squares Rule as it applies to scouts.  It might be fine as well though the odds are against it.



i77rs4m.jpg

The complete GS&F Rules can be found here: http://forum.strateg...rum-rules-2016/

Draw Refusal Rules, specifically, can be read here: http://forum.strateg...604#entry339604


#8 Rick L

Rick L

    New Recruit

  • Members
  • Pip
  • 7 posts
  • Coat of arms
  • Bronze Spy

Posted 05 June 2018 - 04:09 AM

Gary, I contacted Imer, who wrote Probe. He's easy to reach: imer@imersatz.com. He said that he only wrote the AI engine, so the Two Squares rule might be implemented differently on the player's side. He's going to check and get back to me. If there's a problem (as appears to be the case), I think we'll see a revision soon. The old Windows version of Probe was entirely by Imer, so the same rule applied on both sides.



#9 Fks

Fks

    Major

  • NASF Committee
  • 1,122 posts
  • Coat of arms
  • Platinum Marshal

Posted 05 June 2018 - 04:40 AM

Gary, I contacted Imer, who wrote Probe. He's easy to reach: imer@imersatz.com. He said that he only wrote the AI engine, so the Two Squares rule might be implemented differently on the player's side. He's going to check and get back to me. If there's a problem (as appears to be the case), I think we'll see a revision soon. The old Windows version of Probe was entirely by Imer, so the same rule applied on both sides.

Templaterex maybe you would want to have a chat with this guy?


Proud Member of the North American Stratego Federation (NASF)

http://forum.strateg...18/#entry461226


#10 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 05 June 2018 - 11:12 AM

Rick L, nice work. Can you ask Imur what it would take to turn the 'local' multiplayer and turn into an 'online' multiplayer?
Gary, looks like you may have gotten something corrected for those of us that play. Thank you.

Anyone who has android and has not yet downloaded the app is missing out. It sounds like the future for this app will become even better yet.

#11 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 05 June 2018 - 10:28 PM

Rick, let Imur know there is a glitch that shows old information associated with pre-probe update. It seems to not have new results factored in at all.

#12 Rick L

Rick L

    New Recruit

  • Members
  • Pip
  • 7 posts
  • Coat of arms
  • Bronze Spy

Posted 05 June 2018 - 10:59 PM

Wogomite, you're talking about rankings? You're saying you think the rankings should start from scratch? I can ask.

 

I found pseudocode online for the Two-Squares Rule. Anyone a programmer? Does HB violate this?

 

method breaksTwoSquareRule(move)
limit := 5
for(count := 1 ; count <= limit ; count++)
prevmove := getMove(current-2*count)
if( !equal(move,prevmove) && !reverse(move,prevmove) )
return false
return true

method equal(move1,move2)
if(move.toField==move2.toField && move.fromField==move2.fromField) return true
else return false

method reverse(move1,move2)
if(move.fromField==move2.toField && move.toField == move2.fromField) return true
else return false



#13 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 06 June 2018 - 12:21 AM

I dont care if the ranks reset. Im saying the old stats are used for the ranking but each account has been reset which makes the current ranking obsolete without a new one to replace it.

#14 TemplateRex

TemplateRex

    Sergeant

  • Members
  • PipPipPipPipPipPip
  • 454 posts
  • Coat of arms
  • Silver Captain

Posted 06 June 2018 - 06:57 AM

.


Edited by TemplateRex, 4 weeks ago.

I hereby grant explicit permission to all my opponents to record and publish my games as they see fit.


#15 TemplateRex

TemplateRex

    Sergeant

  • Members
  • PipPipPipPipPipPip
  • 454 posts
  • Coat of arms
  • Silver Captain

Posted 06 June 2018 - 06:59 AM

 

I think there is a bug: a logical AND (&&) should be an OR (||):

method breaksTwoSquareRule(move)
limit := 5
for(count := 1 ; count <= limit ; count++)
    prevmove := getMove(current-2*count)
    if( !equal(move,prevmove) || !reverse(move,prevmove) )
        return false
    return true

 

 

Also, I think that Probe has the option to have limit = 3 instead of limit = 5, that is a much better playing experience.


I hereby grant explicit permission to all my opponents to record and publish my games as they see fit.


#16 Rick L

Rick L

    New Recruit

  • Members
  • Pip
  • 7 posts
  • Coat of arms
  • Bronze Spy

Posted 06 June 2018 - 05:19 PM

OK, I got a LOT of information back I think I understand:

 

For rankings, right now HB stores player information on your device. You don't login to a central server. So if you uninstall and reinstall, you start from scratch, even if you use the same name. This may change in the future.

 

For players, HB does implement Two-Squares correctly (except for Scouts, which is for a future release), BUT it also has some kind of anti-chasing rule that's getting in the way. In a future release the anti-chasing rule will be replaced by a proper Two-Squares Rule.

 

Probe does implement the Two-Squares Rule. Since it's a computer program Probe also imposes a set of rules on itself to prevent it from chasing, resuming an earlier chase and repeating a position. Otherwise, you get annoying computer behavior and there's no one to yell at about it. These rules do not interfere with Two-Squares compliance.

 

There is an option in HB that keeps the last piece selected, so you don't have to click on it again to select it.

 

There are plans to add a few player options at some point, and they are open to suggestions.


Edited by Rick L, 06 June 2018 - 05:20 PM.


#17 Wogomite

Wogomite

    Lieutenant

  • NASF Committee
  • 721 posts
  • Coat of arms
  • Gold Lieutenant

Posted 06 June 2018 - 10:10 PM

An online multiplayer would be ideal!

#18 Rick L

Rick L

    New Recruit

  • Members
  • Pip
  • 7 posts
  • Coat of arms
  • Bronze Spy

Posted 07 June 2018 - 04:49 PM

Just got word that a Two-Squares Rule fix is releasing over the next couple of days.


  • GaryLShelton and Wogomite like this

#19 Nortrom

Nortrom

    General

  • Moderators
  • 2,013 posts
  • Coat of arms
  • Platinum Marshal

Posted 08 June 2018 - 08:49 AM

The following was used during AI world championships

 

TWO Square rule

method breaksTwoSquareRule(move)
    limit := 3
    for(count := 1 ; count <= limit ; count++)
        prevmove := getMove(current-2*count)
        if( !equal(move,prevmove) && !reverse(move,prevmove) )
            return false 
    return true 

method equal(move1,move2)
    if(move.toField==move2.toField && move.fromField==move2.fromField) return true
    else return false

method reverse(move1,move2)
    if(move.fromField==move2.toField && move.toField == move2.fromField) return true
    else return false

Multiple square rule

forbiddenPositions := new List   //this list contains all board positions that you are not allowed to create again 

method isAttackingMove(move)
    if (move involves combat) return true
    else return false

method breaksMoreSquareRule(move)
    // if combat, then there is obviously not a chase
    if(isAttackingMove(move)) return false

    // if we're moving opposite of last move, that is the
    // domain of the two square rule
    if(reverse(move,myLastMove)) return breaksTwoSquareRule(move)

    // perform the move - update board state based on move - to allow testing validity
    board := performMove(board, move)

    // if the board state is in the forbidden list, then it's not valid
    if(forbiddenPositions contains board.hash()) valid := false
    else valid := true

    // unperform the test move we just made
    board := unperformMove(board, move)

    return !valid

method doMyMove(move)
    // if it doesn't break the rule
    if (!breaksMoreSquareRule(move)) {
       ...code for executing move...
       // add all board positions after your own moves to the forbidden list
       forbiddenPositions.add(board.hash())   
       // record my last move
       myLastMove := move
    }

method doOpponentMove(move)
    // if opponent is not running away from us...
    if(!nextTo(myLastMove.endField,move.startField)
        // empty forbidden list when opponent doesn't move from a field
        // next to where our last move ended 
        forbiddenPositions := new List   

    ...code for executing move...

https://web.archive....wo-Squares_Rule


  • Fks likes this
"Rock is overpowered, paper is fine" - scissors

#20 GaryLShelton

GaryLShelton

    Flagbearer

  • Moderators
  • 5,348 posts
  • Coat of arms
  • Platinum Spy

Posted 12 June 2018 - 02:50 AM

Also, I think that Probe has the option to have limit = 3 instead of limit = 5, that is a much better playing experience.

 

Probe has a lot of wonderful options.   The old 5 move Two Squares limit was an option to match the former ISF rules for those who may still have liked such a thing.  These were changed several years ago in the ISF to the current 3 moves that we now use.  Playing Probe with the 5 moves setting in place is a painful thing because it will often use those 5 moves.  :)


  • Dobby125 likes this

i77rs4m.jpg

The complete GS&F Rules can be found here: http://forum.strateg...rum-rules-2016/

Draw Refusal Rules, specifically, can be read here: http://forum.strateg...604#entry339604





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users