archief:aichallenge
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
archief:aichallenge [2015/08/02 16:49] 0.0.0.0 aangemaakt |
archief:aichallenge [2021/11/23 14:14] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Aichallenge ====== | ====== Aichallenge ====== | ||
+ | == Run Server == | ||
+ | svn checkout http:// | ||
+ | cd ai-contest-read-only/ | ||
+ | apt-get install python-mysqldb php5 openjdk-6-jdk openjdk-6-jre-headless mysql-server php5-mysql | ||
+ | |||
+ | Make a file called server_info.py with the contents: | ||
+ | server_info = {" | ||
+ | And server_info.php with (not mail password and mail_username this time): | ||
+ | <?php $server_info= array(" | ||
+ | |||
+ | |||
+ | Set the submission_directory in www/ | ||
+ | |||
+ | Change the link in planet_wars/ | ||
+ | |||
+ | Create database in mysql | ||
+ | mysql -p | ||
+ | create database zeus; | ||
+ | create table zeus.users(user_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.submissions (submission_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.languages (language_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.maps(map_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.user_status_codes(status_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | insert into zeus.user_status_codes(name) values (' | ||
+ | insert into zeus.user_status_codes(name) values (' | ||
+ | create table zeus.organizations(org_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | insert into zeus.organizations(org_id, | ||
+ | create table zeus.jail_users(jail_user_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.games(game_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.leaderboards(leaderboard_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.rankings (ranking_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.countries(country_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | create table zeus.playback(playback_id MEDIUMINT NOT NULL AUTO_INCREMENT, | ||
+ | alter table users add key ' | ||
+ | |||
+ | |||
+ | For every supported language something like this | ||
+ | insert into zeus.languages(main_code_file, | ||
+ | insert into zeus.languages(main_code_file, | ||
+ | |||
+ | You could also add some countries. | ||
+ | |||
+ | chmod +x generate_many_maps.sh; | ||
+ | ./ | ||
+ | python add_maps_to_database.py 100 | ||
+ | |||
+ | Create some local users on your machine to add here, they need an ssh account that is set up to auto log in using the jail_id_rsa (you might want to create a new pair) | ||
+ | |||
+ | insert into zeus.jail_users(in_use, | ||
+ | insert into zeus.jail_users(in_use, | ||
+ | |||
+ | Create jail users | ||
+ | create_jail_users.py 10 | ||
+ | |||
+ | cd to planet_wars/ | ||
+ | python compile_daemon.py 3000 & | ||
+ | python tournament_manager.py 3000 & | ||
+ | ./ | ||
+ | You will want to put these in a cron.hourly for 3500 secs or so, update rankings should be run like every 30 minutes. | ||
archief/aichallenge.1438534146.txt.gz · Last modified: 2021/11/23 14:02 (external edit)