Showing posts with label Atlantis. Show all posts
Showing posts with label Atlantis. Show all posts

Thursday, October 04, 2018

An AI for Atlantis

I've been working on an AI for Atlantis for a while now. Finally have something to show for it!





I created a game with four players (all AIs). The nexus has no exits, so there are random jumps out. They are using pretty much the same strategy - find good hexes and ramp them as quickly as possible.

Thursday, February 23, 2017

Atlantis Updates

Lots of changes with little posting!

In the new game, there is a sizable lake region.  The color difference versus ocean was not sufficient to differentiate them.  I've made oceans darker.

I've also gotten complaints about how unexplored territory is shown.  I've settled on this style, which has the underlying color, with a stippling of gray12 drawn on top.

Most of the development has been in order checking.  I now check the first word of all commands to make sure they are real.  I also check the targets of GIVE commands, and some inventory checking (making sure you don't give what you don't have).  I also check that units doing STUDY have enough silver (based on the skill table - the first turn of studying a new skill will not be checked).

I'm also showing the last seen foreign units in hexes without the current data.  I was having trouble remembering what monsters were where, and where I had seen enemy units.

Monday, July 25, 2011

Exits In

Oh yea!



One of the last things I need ALH for is the underworld walls. Foolishly, I had assumed that every adjacent hex is connected to every other (and x wraps, but y doesn't). Of course, once my units started exploring the underworld, I realized I was wrong.

So, I had been tabbing back and forth, entering orders into my client, while looking at ALH for walls.

No more!

I've also added some niceties, like the total number of men in a unit ("1 men").

Thursday, July 14, 2011

Atlantis Updates

Some good new stuff!

I've lightened the hex borders (due to a request by a potential user). I've also added icons for taxing, production, shafts, and buildings. I also modified the city icons to reflect the size: villages are '-', towns are '+', and cities are '*'.

The new window is for production. Currently, I am just showing the maximum production values. But you can sort on the production name and value columns.

Thursday, July 07, 2011

Roads in!


With the near completion of the Rycdome-RathLuire highway, I needed to get that done :)

Sunday, June 19, 2011

Icons

Getting close!

I've been putting off doing the math for the icons :) Lots of radical threes.

Here we can see the three main icons - * for a city, ! for enemy units, @ for my units. ALH also has icons for ships, taxing, production. It also differentiates between my units on guard vs. not on guard. Not sure how important that is (although I need ships)...
I also still need to add roads and buildings.

Wednesday, June 08, 2011

Show Production

My goal is to get this thing to the point where I can do my turns. I added exporting orders yesterday, now I can display the region production.

I'm using a wrapping label, which seems less than ideal. But I wasn't sure what else would look good...
Now I need to show whats for sale (and maybe what they'll buy, but that is less useful). I also need to show unit skills somewhere.

Monday, June 06, 2011

Z Problem

Programming is all about assumptions. You have to make certain assumptions about what your software is going to encounter, and how different modules will work together. To do otherwise would require total knowledge, and the development of a system that could handle anything (which would make it smarter than any human, so you'd be developing strong AI).

As long as your assumptions hold, your software will work well. And if new features fit in with those assumptions, they will be easier to add. If they violate the assumptions, you're in for a world of hurt.

When I started the True Atlanteans client, I knew it was possible to have a z coordinate for hexes. But I didn't have any test cases, and I figured it was a long way off. Well, I just got some test cases, so I guess I have come a long way!



Once again, Tcl and Sqlite made things pretty easy. I rebuilt the tables with a z coordinate and added a couple of entries to the right click menu (yea, I have a right click menu, unlike ALH).

I also fixed the one man unit bug in the old style parser. Rereading the last blog entry made me realize that items have [ABBR], while flags do not.

Sunday, June 05, 2011

Items Up!

I must say, working with Tcl and Sqlite has been a real pleasure. Adding orders required changes in about 3 places, most being one or two lines of code: import the data from the TON file, pull the data during unit update, build the GUI items.

The items changes were about the same. My original thinking was that I would need a separate table for items, keyed by the unit id. But Sqlite lets me toss a whole Tcl list into a cell, so I just went with that...

The item box is above the old order box. I figured it would scroll pretty often, so I stuck a scrollbar on there right away (orders might need a scrollbar).

This example shows the frustration inherent with trying to parse the old file format. Units with one man don't get that man in the items (Fast Couriers are one man units in my empire).

Why?
Here is the entry for Fast Courier 416:
* Courier - Fast (416), Last Outleans (6), avoiding, behind, revealing
faction, holding, receiving no aid, nomad [NOMA], 14841 silver
[SILV], 20 horses [HORS], 5 herbs [HERB], 2 mink [MINK], 4 velvet
[VELV], ivory [IVOR], mithril [MITH], 2 chocolate [CHOC], pearls
[PEAR], 2 spices [SPIC], 2 roses [ROSE], 2 caviar [CAVI], 2 cashmere
[CASH], iron [IRON], silk [SILK], pick [PICK]. Weight: 1089.
Capacity: 0/1400/1415/0. Skills: combat [COMB] 1 (30).

The star ('*') indicates this is a full data report ('-' is limited data, '+' is buildings). Then comes the unit and faction names. After that are the unit flags, then items.
Everything is comma separated, with big groups period separated (items, weight, capacity, skills).

But there is no way to tell when flags end and when items begin.

My parser is looking for a number (no flags have numbers, and any item count above 1 will have a number). I suspect ALH understands all the men types, and is checking that... or it understands all the flag names and promotes mismatches. I guess I could tell by making a new flag and seeing if ALH promotes it to an item with count 1 :)

Thursday, June 02, 2011

Orders are in!

Lots of furious Tcl (and SQL) hacking behind this!


Pretty close to ALH. I just need to capture changes to orders, and add hex decorations. Then it will be on to new functionality!

Sunday, May 15, 2011

True Atlanteans

Lots of progress, haven't had time for updates. I am building a client for Atlantis, similar to Atlantis Little Helper (see screenshot).

Here is what I have so far:

Obviously, not as much functionality right now, but it is improving quickly. The main advantages will be that I can understand this code (currently less than 500 lines of Tcl).

Also, the code uses an internal database to store the turn information, so should be less vulnerable to disruptions (and more easily support multiple games).

This will be the main visualization tool for any changes we make to Atlantis (currently, I have already hacked in the new turn format).