Java-Gaming.org Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (672)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 47
1  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-05-04 21:44:05
Well, my dwarves and elves are tinkering away on my hnefatafl automaton, and we have a (1) fast AI that prunes but does not do playouts and (2) an MCTS AI. The MCTS AI uses the fast AI for the playouts. I have been seeing how increasing the number of playouts improves the results for the MCTS AI, and I see a clear progression. Here the MCTS is playing defenders and the fast AI is attacking. In each iteration I double the number of playouts per position.

dwins = number of games won by defender : average turns to win
awins = number of games won by attacker : average turns to win
draws = games that went over 250 turns without a winner


2 playouts for defender: dwins=10:100, awins=6:107, draws=4
4 playouts for defender: dwins=15:66, awins=3:103, draws=2
8 playouts for defender: dwins=19:60, awins=1:87, draws=0
16 playouts for defender: dwins=19:40, awins=1:39, draws=0
32 playouts for defender: dwins=18:31, awins=0:0, draws=2


2  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-02 16:02:42
I was thinking you could change the move command from:

a3-a1

to:

a3-a1 1000

Where 1000 is the ms to wait for a better move from the AI. If the current overtime would expire, play this move rather than expiring the overtime.

Otherwise millisecond mismatches (quite possible with comms by stdin and stdout) can cause an AI to run out of its overtimes.
3  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-02 11:12:25
I don't see mention of how many seconds I will have per turn. I don't care about overtimes or other fancy rules, I just want to know how many seconds I have per turn.

In this interaction:


Received: hello
Sent: rules dim:11 name:Computer_Fetlar atkf:y tfr:w start:/3ttttt3/5t5/11/t4T4t/t3TTT3t/tt1TTKTT1tt/t3TTT3t/t4T4t/11/5t5/3ttttt3/
Sent: clock 202798 200000 15 4 4
Sent: play attackers


... I'm not sure what the clock command is telling me, probably because I don't understand how competition clocks work.

Also time is not very meaningful for a computer without a benchmark of performance. Do you have any benchmark numbers for the AWS instance you will use?

I'm a bit paranoid about time, so I'm concerned my AI might send a command late. Is there any possibility to send a preliminary move and then send refinements until the clock runs out for that move?

Can I make my AI networked so that it can offload MCTS playouts to a set of client computers? I guess that's not allowed for AI v AI competition, but would it be allowed for the possible exhibition match against a strong player?
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-05-02 07:15:16
I've flown in one of those.... very nice!
5  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-05-01 20:45:07
Both my sides got game now! I'm getting defender AI and attacker AI winning randomly.
6  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-29 10:52:56
@Fishbreath, can you extend your protocol description with a an ordered list of examples? Starting with the literal hello and rule setup, followed by a couple of moves and a resignation or victory claim? Then I can use your ordered list of examples as a test of my protocol implementation (with the test players mocked to return the responses mentioned in your example). In fact a few "recordings" of games delivered as XML/JSON covering all the edge cases would greatly simplify integration with OpenTafl.

You also mention the need for an ini file. Can you provide a template?

What happens when an AI gives an illegal move? Does OpenTafl validate the moves, and if it does, what happens?
7  Discussions / Miscellaneous Topics / Re: Unsolicited blank CD in post - huhh? on: 2016-04-29 05:06:17
No update, it's just one of those mysteries.
8  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-27 20:41:50
I have something resembling intelligence:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
  | a b c d e f g h i j k
 -+----------------------
 1| H - - X X X X X - - #
 2| - - - - - X - - - - X
 3| - - - - - - - - - - -
 4| - - - - - X O - - O -
 5| X O - X - - - - - - -
 6| X X - O O T O O - - X
 7| X - - - O O O - - X -
 8| X - - - - O - - - - X
 9| - - - - - - - - - X -
10| - - - - - X - - - - -
11| # - X - X X X X - - #

King home? true
Last move: c1-a1
Killed pieces: 1
Enter move (eg: e1-c1:
DEFENDERS WIN!
Victory at move: 16


I was playing defenders, and I had to think a little. The computer curently has a strategy of preferring moves that restrict king freedom, but the AI does not look ahead to future moves yet.

Also, I have a minor bug in my move generator, where pieces are unable to cross an empty throne (the throne is in the middle of the board, only the king can "sit" there, but other pieces should be able to move through the square if it is empty).
9  Games Center / Contests / Re: The OpenTafl Computer Tafl Open - An Abstract Strategy AI Tournament on: 2016-04-27 13:07:20
Shall we post alphas of our AIs on this thread?
10  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 16:27:05
Fishbreath, how do I integrate with OpenTafl? I don't see instructions on your site. I'd like to see a minimal AI Java implementation to bootstrap my effort.

Also, what resources is OpenTafl providing me - can it give me board state and available moves info, or do I have figure out this in my own AI (so every AI might have different ideas about what a legal move is).

Also, it might be worthwhile to post your competition in the competitions board on JGO, rather than burying mention of it in my thread
11  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 10:09:44
I'm at the point at which I can start teaching the AI to play well. As I don't know how best to prune the tree, I think I will use genetic algorithms to discover a pruning function.

I downloaded some Tablut games for Android, and I think I can do better. Anyways, I will definitely enter Fishbreath's competition.
12  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-26 06:58:58
I disagree, "modernized" carries with it the sense that whatever it replaced was outdated and that's simply not possible in an abstract game.
13  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-04-24 14:30:58
Thanks for the feedback!

I have not put any real effort into player-world interctivity (aka playability) as my time has been chewed up by AI. So after you have collected a few apples there is not much to do. I have shifted focus away from AI now to the user interface and adding in hopefully fun elements, so by the end of the year there may be more of a game here.

Regarding finding home, I will add a popup menu item for that.
14  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-23 15:35:02
Re Thud!

Quote
Thud! is similar to Hnefatafl but is not actually a member of the tafl family (See http://boardgamegeek.com/boardgamefamily/4049/tafl) because the manner of capture has been modernized and the game involves no king piece.

This statement has been bugging me for a week. Hnefatafl, tablut etc are abstract games. There is no possible meaning to the statement that Thud has "modernized" the manner of capture.
15  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-21 17:31:26
I'm a bit further on now, I have a basic AI that makes random legal moves.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
  | a b c d e f g h i j k
--+----------------------
 1| # - - X X X - - - X #
 2| - - - - - X X - - - -
 3| - - - - - - - X - - -
 4| - - O - X - O - - - -
 5| X - - - O - - - O - X
 6| X X - - O T O - - X X
 7| - - - O O O O O - X -
 8| X - - - - - - - - O X
 9| X - - X X - - - - - H
10| - - - - X - - - - - -
11| # - X - - - X X - - #

King home? false
King can reach corner? true
King can reach edge? true
Enter move (eg: e1-c1):
16  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-21 10:52:26
I completed work on the first version of the AI Smiley

1  
2  
3  
4  
5  
    public interface AI {
        default String recommendMove(char[] board, char[] canMove) {
            return "resign";
        }
    }
17  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-20 11:23:57
Modified the coverage method given above to use method references. I updated the post.
18  Game Development / Newbie & Debugging Questions / Re: detecting sprite clicked on on: 2016-04-18 21:08:13
I write out a collection of ClickBounds objects when I render my entities (because that's when I know the screen coordinates) and then I iterate throught the collection to resolve any mouseOvers or clicks.
19  Game Development / Newbie & Debugging Questions / Re: detecting sprite clicked on on: 2016-04-18 20:17:39
Can you please give more information? I don't see how this:

Quote
what is the best way to detect which you have clicked on?

...relates to...

Quote
What I want it for is these sprites hold various tools etc.
20  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-16 18:47:01
That's good info, thanks.I was aware of tablut, most reconstructions of hnefatafl rules are based on the presumed similarity to tablut. Let's see how I do at building an hnefatafl AI.

@ddyer, I'm liking boardspace.net! http://boardspace.net/english/about_tablut.html

@Drenius, I looked up the other game you pointed out (Kubb) and it seems to have no genuine Viking connection. It's not mentioned in the sagas for certain. As far as lawn games go, they seemed to do a lot of wrestling Smiley

If I can get this tafl game working well I can add it into Vangard as a game in a game. The vikings prized playing well, but in particular admired quick play, so I could make the moves timed.
21  Discussions / General Discussions / Re: Message preview not working on: 2016-04-16 12:06:33
Minor issue... you can always post then edit your post.
22  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-15 10:43:28
Playing with this in my lunch breaks.

I started with generating a coverage map:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
. x x . . . . . x x . 
x x x b b . b b x x x
x x . b b b b b . x x
. b b b b . b b b b .
. b b b . . . b b b .
. . b . . . . . b . .
. b b b . . . b b b .
. b b b b . b b b b .
x x . b b b b b . x x
x x x b b . b b x x x
. x x . . . . . x x .


Defenders cover little o squares, attackers cover little x squares and both cover b squares.

Code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
    private static final int OFF_BOARD = -1;

    public interface Direction {
        int at(int square, int distance);
        Direction LEFT = KingsTable::left;
        Direction RIGHT = KingsTable::right;
        Direction UP = KingsTable::up;
        Direction DOWN = KingsTable::down;
        Direction[] DIRS = {LEFT, RIGHT, UP, DOWN};
    }


    private static char[] calculateCoverage() {
        char[] coverage = new char[ROWS * ROWS];
        Arrays.fill(coverage, '.');
        for (int i = 0; i < coverage.length; i++) {
            char mover = board[i];
            if (mover == 'X' || mover == 'O' || mover == 'H') {
                for (Direction dir : Direction.DIRS) {
                    for (int j = 1; j < ROWS; j++) {
                        int neighbor = dir.at(i, j);
                        if (neighbor != OFF_BOARD) {
                            if (board[neighbor] == '-') {
                                coverage[neighbor] = cover(mover, coverage[neighbor]);
                            } else if (mover == 'H' && (board[neighbor] == '#' || board[neighbor] == 'T')) {
                                coverage[neighbor] = cover(mover, coverage[neighbor]);
                            } else if (board[neighbor] == 'X' || board[neighbor] == 'O' || board[neighbor] == 'H') {
                                break;
                            }
                        } else { break; }
                    }

                }
            }
        }
        return coverage;
    }


Next up is a heat map suggesting favored squares based on my ignorant noob concept of the game.
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-14 20:18:57
Added move-to-mouse-click to Vangard, no more watching the paint dry as the sprite slowly rotates onto a new bearing Smiley

Also added a tranlucent radial popup menu to Vangard... although currently only the menu is displayed and not the menu items yet.
24  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-13 19:00:48
This set of rules seem fairly well worked out:

http://aagenielsen.dk/copenhagen_rules.php

The number of possible victory conditions boggles the mind. The recommended board is 11x11, which makes it a bit easier on the AI.

Assuming an MCTS approach, the tree of moves can be pruned as follows:

The attackers favor moves to block the corners.
Moves adjacent to enemies are discouraged if enemies can immediately move to the opposite side. Otherwise moves adjacent to enemies are favored?
Moves that increase board coverage are favored, where board overage is the total number of possible moves available from the new position.
Moves that decrease enemy board coverage are favored.

But I think MCTS would have trouble seeing shieldwall and fort situations.
25  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-13 15:59:49
Interesting thing is the rules need to be flexible. Players might agree to play a "shieldwall" rule, change which side goes first, change the movement of the king...
26  Discussions / Miscellaneous Topics / Re: The "impressiveness" of games on: 2016-04-13 11:17:08
I try to create games that have not been created before (as far as I am aware of it anyway). I wouldn't see the point in making a pacman clone because better programmers and better graphic artists than me have done it a thousand times already. But if I can come up with a new (to me) mechanic or a different way of interacting with a game, then I feel happy with what I've done. I'm never happy with the code I've written, I always have the sense it could be done better.
27  Game Development / Newbie & Debugging Questions / Re: Design pattern for RPG skills (good, bad, horrible?) on: 2016-04-13 11:12:09
If you just have an array of ints all the skills will be closer together in memory, which should help performance at the expense of (possibly) using a bit more memory.
28  Game Development / Artificial Intelligence / Re: Hnefatafl on: 2016-04-12 19:40:55
Exactly like that. Can I copoy the first image to the top post?
29  Game Development / Artificial Intelligence / Hnefatafl on: 2016-04-12 19:10:15
The vikings played a game called hnefatafl (king table) often mistranslated as chess. The rules are quite simple as far as they have been pieced together. The game is played on boards of varying sizes, 13x13 is the most common. The king starts on the central square, his throne. He is surrounded by his warriors. On the edges of the board are attackers outnumbering the defenders 2 to 1. All pieces move like chess castles except the king, who moves like a chess king (but not diagonally).

The defender wins if the king escapes to any corner.

The attacker wins if they surround the king.

You kill enemies by moving to opposite sides of an enemy piece. It is legal however to move into the gap between two enemy pieces.



https://historyundusted.wordpress.com/?s=Hnefatafl

How would you go about building an AI for this? MCTS looks easy but there are a go-like number of moves for each turn...
30  Game Development / Game Mechanics / Re: Loot tables on: 2016-04-12 11:36:02
You can't include the time to build the loot table - that is one-off on game load. The TreeMap.ceilingEntry() lookup should be a binary search so O(log n). If boxing is an issue a primitive map can be used, but that is not necessary in this context as you note.
Pages: [1] 2 3 ... 47
 
IanParcs (49 views)
2016-04-18 14:18:53

KaiHH (47 views)
2016-04-18 08:35:41

KaiHH (77 views)
2016-04-15 12:43:58

theagentd (81 views)
2016-04-14 02:16:17

theagentd (95 views)
2016-04-14 02:15:43

IanParcs (110 views)
2016-04-12 03:51:16

IanParcs (49 views)
2016-04-12 03:50:03

IanParcs (45 views)
2016-04-12 03:49:54

IanParcs (42 views)
2016-04-12 03:49:52

IanParcs (50 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!