Skip to content

Implementation of the program synthesis algorithms Sketch-SA and Sketch-UCT from the article "What can we Learn Even From the Weakest? Learning Sketches for Programmatic Strategies".

Notifications You must be signed in to change notification settings

leandrocouto/sketch-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What can we Learn Even From the Weakest? Learning Sketches for Programmatic Strategies

by Leandro C. Medeiros, David S. Aleixo, Levi H. S. Levis

This paper was submitted and accepted for publication in AAAI-2022.

Abstract

In this paper we show that behavioral cloning can be used to learn effective sketches of programmatic strategies. We show that even the sketches learned by cloning the behavior of weak players can help the synthesis of programmatic strategies. This is because even weak players can provide helpful information, e.g., that a player must choose an action in their turn of the game. If behavioral cloning is not employed, the synthesizer needs to learn even the most basic information by playing the game, which can be computationally expensive. We demonstrate empirically the advantages of our sketch-learning approach with simulated annealing and UCT synthesizers. We evaluate our synthesizers in the games of Can't Stop and MicroRTS. The sketch-based synthesizers are able to learn stronger programmatic strategies than their original counterparts. Our synthesizers generate strategies of Can't Stop that defeat a traditional programmatic strategy for the game. They also synthesize strategies that defeat the best performing method from the latest MicroRTS competition.

Code Structure

This repository contains both Python and Java implementations of the algorithms presented in the article. They are located in the subfolders cant-stop-sketch-learning and microrts-sketch-learning, respectively. Please refer to the README.md of each folder for specific information on the dependencies and how to run the code for each implementation.

License

Distributed under the MIT License.

Copyright (c) 2022 Leandro C. Medeiros, David S. Aleixo, Levi H. S. Levis

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Implementation of the program synthesis algorithms Sketch-SA and Sketch-UCT from the article "What can we Learn Even From the Weakest? Learning Sketches for Programmatic Strategies".

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published