You can download the binaries for Stratagus with my updates here.
In order to run them, you will also need to install libpng. Follow the instructions in Appendix D of the final version of my thesis, soon to be posted in this blog.
When Working With Code...
Friday, April 25, 2014
Stratagus and Wargus Source Code with BARC
Here are the locations where you can download the full source code with my BARC modifications made.
Stratagus Download
Wargus Download
Stratagus Download
Wargus Download
Wednesday, April 16, 2014
Thesis Full Draft 2
Here is my latest revision of my Thesis after the updates and changing over to C++ from Java.
Saturday, March 29, 2014
Thesis Progress Report 3/29: Switching Languages and Redoing BARC
I discovered that in order for LuaJava to work properly, the Lua file must be started from the Java class (ie, it would not let me start a Java program from a Lua file). Since I was intending to use Lua to start up the Java file, I can no longer use LuaJava as the interface between BARC and Lua. As such, I am converting BARC to C++, which can be used directly with Lua. I will write the BARC functionality all in C++, and the AI Lua files will call on the BARC methods at the end of the tactic files.
To accomplish this, I had to compile Stratagus from source code. During the steps of exploring how I can accomplish linking the Lua and C++, I found I had to uncomment 3 lines which were blocking the Lua os, io, and package libraries from being loaded. With these now included, I can execute command line commands and write out to files, allowing me to create an ai_log.txt file to log how my ai is working. I was also able to compile it with the debug option on, so I now have a debug log to follow the flow of the program.
To accomplish this, I had to compile Stratagus from source code. During the steps of exploring how I can accomplish linking the Lua and C++, I found I had to uncomment 3 lines which were blocking the Lua os, io, and package libraries from being loaded. With these now included, I can execute command line commands and write out to files, allowing me to create an ai_log.txt file to log how my ai is working. I was also able to compile it with the debug option on, so I now have a debug log to follow the flow of the program.
Saturday, March 22, 2014
Thesis Progress Report 3/22: Changes to the BARC/Wargus Interface
Some new information has come to light which changes how I have to handle the BARC/Wargus interface. Originally, I thought I could just write out a Lua file during the run to control the AI, and have the Wargus engine execute it. This file would be overwritten on each state change. I then discovered that all of the AI Lua files are loaded on startup, so this idea wouldn't work. I then decided to try having all of the files written out, and then using BARC to select which one was currently executing. This idea gained some traction, until I discovered that Wargus only executes one AI script per game.
Finally, I came up with a new way to handle controlling the AI with BARC. Wargus will launch the AI with a custom script. This script will tell the AI to execute the starting tactic, and then make a call to an interface. The interface will take the game information (from the call of the Wargus AI), and then call advanaceState() on BARC. BARC will return the next tactic to use to the interface. The interface will then load the next tactic (which will be written out already, but not loaded), leading to Wargus executing the new file. At the end of this file, the cycle repeats. When it reaches the states which have nothing following them, the states will loop instead of calling on BARC.
Finally, I came up with a new way to handle controlling the AI with BARC. Wargus will launch the AI with a custom script. This script will tell the AI to execute the starting tactic, and then make a call to an interface. The interface will take the game information (from the call of the Wargus AI), and then call advanaceState() on BARC. BARC will return the next tactic to use to the interface. The interface will then load the next tactic (which will be written out already, but not loaded), leading to Wargus executing the new file. At the end of this file, the cycle repeats. When it reaches the states which have nothing following them, the states will loop instead of calling on BARC.
Friday, February 28, 2014
Thesis First Draft
Here is my first draft.
Labels:
abstract,
AI,
BARC,
case-based reasoning,
CBR,
first draft,
Thesis,
Wargus
Monday, February 24, 2014
Thesis Progress Report 2/24: BARC Updates Complete
Earlier today I finished adding in XML loading/saving in BARC. I used XStream to save the building state list, and then reinitialize the list from the the XML file. I implemented the Logger, and then fixed the performance updating at the end of the game.
The BARC framework is complete, but the real tactics need to be added in (Right now it is just a dummy comment). I plan on trying to communicate with the authors of Learning To Win to get the tactics they used, but in the mean time I will be working on developing some simple tactics to be used.
The remaining steps are:
1. Explore Wargus APIs
2. Tell Wargus to use scripts produced by BARC
3. Find a way to get Wargus to send BARC the game information
4. Find a way to automate the games, recording game information.
The BARC framework is complete, but the real tactics need to be added in (Right now it is just a dummy comment). I plan on trying to communicate with the authors of Learning To Win to get the tactics they used, but in the mean time I will be working on developing some simple tactics to be used.
The remaining steps are:
1. Explore Wargus APIs
2. Tell Wargus to use scripts produced by BARC
3. Find a way to get Wargus to send BARC the game information
4. Find a way to automate the games, recording game information.
Labels:
AI,
BARC,
case-based reasoning,
CBR,
code,
developer options,
Thesis
Subscribe to:
Posts (Atom)