Welcome to the Forum for The Airline Project

Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating the Airlines (Demo of RyanAir)
#1
So hi guys!

Today I would like to show you the work I was able to do.

This is the New Ryanair .xml for the AI (or at leat I think the AI is looking for this document).

So, at the beggining I've added some Airliners to the poll:

[Image: 266airliners_ryanair.png]


After this I started to add the Destinations (One Way Only, the game should automatically create return flights, if I got it correctly from the 9 Air file, what was as a basis for me):
[Image: 364routes1_ryanair.png]


Now look at the numbers on the Left!

At the end I ended up with This:
[Image: 719routes2_ryanair.png]


So this was my first try.

I still have to test it in-game, but I opened this thread to ask Pjank and Tjoeker about one thing:
- Is the AI sniffing theese .xml's to play from them? 

Anyway, the file size has grown to 100KB. Big Grin


Anyway, I'm planning to update ALL THE AIRLINES in the game.
Well, I was not completely honest with you:
I've allready done some work with AeroFlot, Air France, AerLingus and other smaller and larger airlines and I'm trying to update them completely, hopefully the game can make use of it. Smile
Reply
#2
You will have a lot of fun, updating all airliners.  Big Grin

You got the routes-code correct. Wink


Yes, AI uses these files to create new routes and buy new airliners.

We had a discussion a few months ago about these premade routes.
It was said they made airliners predictable if you've played with them a few times.

But please, continue your awesome work. Smile
I believe we should have it optional:
-Either the airliner doesn't use these files and fully uses its intelligence to create routes
-or the airliner uses its intelligence for creating routes, while preferring these premade onces.

(And I'd probably mostly play with the 'prefer preset routes' mostly.)
Reply
#3
(01-29-2018, 05:55 AM)Tjoeker Wrote: You will have a lot of fun, updating all airliners.  Big Grin

You got the routes-code correct. Wink


Yes, AI uses these files to create new routes and buy new airliners.

We had a discussion a few months ago about these premade routes.
It was said they made airliners predictable if you've played with them a few times.

But please, continue your awesome work. Smile
I believe we should have it optional:
-Either the airliner doesn't use these files and fully uses its intelligence to create routes
-or the airliner uses its intelligence for creating routes, while preferring these premade onces.

(And I'd probably mostly play with the 'prefer preset routes' mostly.)
I will definiately continue working on them.

Anyway, I came up with some new instructions for the .xml's, what should be added to the aircrafts, which I will list Here:

1. buyfrom="xxxx" - Specifies the year from when the airline company can buy the specified aircraft.
2. buytill="xxxx" - Specifies a year until the selected aircraft will be purchased by the airline company.
3. sellfrom="xxxx" - Specifies the year from when the airline company can start selling the specific aircrafts.
4. selltill="xxxx" - Specifies the year till when the airline company must sell all the the specific aircrafts.
5. forcebuyin="xxxx" - Instructs the AI to buy all specified airliners the same year (maxing them out as specified by the late="x" command now, in the future the midgame="x" comand).
6. forcesellin="xxxx" - Instructs the game to sell all the specified airliners the same year.
7. replacewith="name" - Instructs the AI to replace the model with an another specific model
8. replacecount="x" - Instructs the AI to replace the old models count with the new models count.
9. replacefrom="xxxx" - The year since the replace should be held.
10. replacetill="xxxx" - the year the replacement should be finished.
11. forcereplace="xxxx" - Replaces the aircrafts the specified year (only can be done if replacecount is="1")
12. leaseable="true/false" - Instructs the AI to Lease or not to Lease the aircraft (this could be catchy to create, I leave it to Pjank if wants to implement it).
13. midgame="x" - Midgame specific aircraft count. If the game decides to sell them, it will be the max, and then the late will become "0" again.

For example:
<airliners>
 <airliner type="Boeing 737-500" early="0" midgame="4" late="0" buyfrom="2003" buytill="2004" forcesellin="2008" leaseable="true"></airliner>
</airliners>

Or:
<airliners>
 <airliner type="Boeing 737-200" early="0" late="7" forcebuyin="1973" replacewith="Boeing 737-500" replacecount="3" replacefrom="1988" replacetill="1990" sellfrom="1989" selltill="1991" leaseable="false"></airliner>
</airliners>


And here are some new instructions for the routes:

1. datestorun="1,2,3,4,5,6,7" - Explains the game what day should he create lines. (1-monday, 2-tuesday, 3-wednesday, ect...)
2. runcount="1,x-y" - Explains the game how many times a day should it run the line.
3. runcount(x)="1" - Specifies a day when the run count should be different.

For Example:
<route destination1="BUD" destination2="DUB" opened="1985" closed="2199" datestorun="1,3,4,6" runcount="2" runcount(3)="1"/>)

QuickTips:
- If the AI doesn't have enough money for the replacement, it should take out a loan for it. Smile
- At the replacing procedure the AI would replace randomly the aircrafts from the poll. The game should copy the assigned timetable to the new aircraft.

For now this is all I came up with. Smile
Later maybe I will have some more ideas for the AI. Smile

Have a nice day guys! Smile
Reply
#4
Hmmm,
I think you're hitting a barrier there, where the AI will always do the same thing in every game.
This takes away the game aspect.

What happens if you start competing on a route? AI will never give up in your case.
Competing is a lost case then..


AI should be made smarter and make decisions based on the situation, not on the xml.
All in all, I don't even think we will need those aircraft lists in the future. They just buy the aircraft they need for the mission.
I believe all AIs should be given a few factors that define a certain play-style.
Using these factors the AI would operate as expected IRL, while not exactly mimicking the real world.
Those unexpected moves are what make a game, a game. Smile

Well, perhaps we could do with a list of preferred airliners, but without dates or quantities?


I'm interested in others' thoughts on this as well. Smile
And of course, we will have to see what Pjank thinks about this. Smile
Reply
#5
(01-29-2018, 11:53 AM)Tjoeker Wrote: Hmmm,
I think you're hitting a barrier there, where the AI will always do the same thing in every game.
This takes away the game aspect.

What happens if you start competing on a route? AI will never give up in your case.
Competing is a lost case then..


AI should be made smarter and make decisions based on the situation, not on the xml.
All in all, I don't even think we will need those aircraft lists in the future. They just buy the aircraft they need for the mission.
I believe all AIs should be given a few factors that define a certain play-style.
Using these factors the AI would operate as expected IRL, while not exactly mimicking the real world.
Those unexpected moves are what make a game, a game. Smile

Well, perhaps we could do with a list of preferred airliners, but without dates or quantities?


I'm interested in others' thoughts on this as well. Smile
And of course, we will have to see what Pjank thinks about this. Smile

You are right.
I was thinking about this one too, just came up with the idea to see what would you guys say. It's true that the AI this way would become more than predictable.

Anyway, if there would be a "Realism" mode in the game, maybe it would add challenge to the player (this is only my opinion tho).

Obviously the AI should decide itself if it wants to create that route, if it's profitable, how many time sit wants to fly on that route, etc...
The problem here is the demand structure.
I think we already discussed it and the implementation of the new formula is on it's way, and I'm waiting for it to see, what is it capable of.

The thing is, that the pax fluctuation is still a big whoopsie in the game.
If you check any airport nowadays, the pax growth is around 10% yearly, and sometimes, for example for an event like 9/11 was, there is a drop of 20-30%.

I know maybe I'm overthinking this, but if there is a yearly increase for passengers, the airline may consider creating a new line for that route.

That way yes, the AI should have some liberty to decide.
So I came up with this comand:

- isprofitable="decide"

This is a simple comand added to ever entry. 
If the AI calculates and thinks that the route in the list is profitable, it starts it.
If it's not, the AI simply skips that route and when the next re-evaluation starts (this should be ayearly cicle, you see what I meant with the pax growth?) the game may decide to start that route.

And for the airplanes...
I think ths way the game would not have to think twice what to buy. Obviously, as you said, there should be a "Free Roam" game too, where the airline decides by itself what airplanes to buy when and what route to open by pure randomness, but for the "Real Data" game I think the airplanes should be added with precision when to buy, replace and sell them. Smile

This is what I came up with for now. Smile
Reply
#6
Another bingo! Big Grin

My main project at the moment is implementing historical data for the airports, so demand between airports will grow exactly as it did IRL. Smile
The previous promised release date for this was last September actually, but I decided to work on it a little longer and include more airports on the first release.
I'm not going to promise another release date (lesson learnt), but I'm trying to have about 30-50% of all European airports finished by then. Smile


In my opinion we won't need that <<isprofitable="decide">>-factor. All routes should be checked, no?
I feel like you should be able to outcompete AI on all routes.
Reply
#7
(01-29-2018, 12:32 PM)Tjoeker Wrote: Another bingo! Big Grin

My main project at the moment is implementing historical data for the airports, so demand between airports will grow exactly as it did IRL. Smile
The previous promised release date for this was last September actually, but I decided to work on it a little longer and include more airports on the first release.
I'm not going to promise another release date (lesson learnt), but I'm trying to have about 30-50% of all European airports finished by then. Smile


In my opinion we won't need that <<isprofitable="decide">>-factor. All routes should be checked, no?
I feel like you should be able to outcompete AI on all routes.

That's right. 

You should be able, but not all the time. Sometimes you should outcompete him with your prices and your offered services.
For example if you are a Low Cost Airline, you should try to attract more pax with your prices.
This is competition. Smile
So if the AI sees, that there is a huge demand on that route, he puts a line there.
Then you arrive and put a line with a lower price, the gamecode triggers more passengers for you and less for the AI, this means the AI has to check the route, what happened and decide if he wants to maintain it or not. Smile
Reply
#8
All good ideas and just let me know what and when to implement :-)
Reply
#9
Lightbulb 
Hey Pjank.

I would say to start implementing theese comands for now.

This way I can recreate a full range of aircrafts buyable for the AI defined by a date. 
The routes I would like to leave for now until I come up with something different to give the AI some liberty to work with the routes. Smile

So, here are the comands to program for the AI to understand:
The "x" is always an integer from '0' to '9'.

1. buyfrom="xxxx" - Specifies the year from when the AI can buy/lease the specific airliner.

2. buytill="xxxx" - Specifies a year until the selected airliner type must be purchased/leased by the AI, maxing out the required amount (now 'late=', later 'mid=').

3. sellfrom="xxxx" - Specifies the year from when the AI can start selling the specific airliner.

4. selltill="xxxx" - Specifies the year till when the airline company must sell all the the specific airliners (reaching the value of 'late=').

5. forcebuyin="xxxx" - Instructs the AI to buy/lease all specified airliners the same year (maxing them out as specified by 'late=', later 'mid=').

6. forcesellin="xxxx" - Instructs the AI to sell all the specified airliners the same year (reaching the value of 'late=').

7. replacewith="name" - Instructs the AI to replace an airliner model with an another specified model (for example a Boeing 737-500 with an Airbus A320-200).

8. replacecount="x" - Instructs the AI how many replacements should be done (for example replacecount="7" means that the game must replace 7x737-500 with 7xA320-200 airliners). The count can not be more than the predefined count of 'mid=' (now 'late=') for the replacement airliner model (!only lower or equal!) and can not be more then the 'mid=' (now 'late=') count for the replaceable airliner type (!only lower or equal!).

9. replacefrom="xxxx" - The year since the replacement should be held.

10. replacetill="xxxx" - The year the replacement should be finished.

11. forcereplace="xxxx" - Replaces the specific airliners the specified year (only can be done if replacecount is="1" to avoid glitching and breaking).


Important lines!

12. mid="x" - Specifies the Maximum amount of a specific aircraft type buyable by the AI company. If the game sells them, the value will decrease and will become "0" again, specified as 'late=' from now on.

13. leaseable="true/false" - Instructs the AI to Lease or not to Lease the specific airliner type.

14. replaceable="true/false/input" - Lets the game replace models based on it's own choice. 
- If set to True, no specific input will be needed, the game would read from the <prefereds>xxxx</prefereds> poll and would choose randomly. 
- If set to False, the game can only sell the airliners. 
- If set to Input, the game would read the data from the specified <airliner></airliner> section and would follow the instructions.

15. forceuse="true" - Avoids not using the aircrafts by the AI on routes (I presume that the game would buy them, would create routes, but some of the aircrafts may not be set to run. With this comand the game would force to add the purchased or leased aircrafts to it's lines, either they are new or already existing ones). It's necessary to add to every entry. 
If missing, the AI may crash or not work properly.

16. ignoreinput="true" - With this comand the AI would completely ignore the specific airliner inputs defined in the, <airliner></airliner> field if needed. What I mean, it would not purchase the airliner type if he decides to not to do it (for example when it's not profitable, the AI is in debt, etc...)

Optional Inputs to avoid confusion for the AI:

17. usefrom="xxxx" - Specifies the year when the AI should start using the specific airliner type.

18. usetill="xxxx" - Specifies the year when the AI should retire the specific airliner type.


These two inputs should be added as optional inputs, becouse I'm not sure if the game would only buy the airliners and then leave them there without doing anything, so for security I added these params too, regardless of the 'forceuse="true"' comand.


I have started adding these params to the .xml's from now on. Smile
You can start programming these features whenever you like to do so. In the .xml's the params will be there, hopefully the game will not crash becouse of them. Smile

Have a nice day! Smile
Reply
#10
Wait.

You say the AI should define for itself when to buy what airliner, yet you're giving it all these parameters?
If you're telling the AI exactly to buy what airliner, how many airliners and when it should buy them, how should the AI define its needs?


If you say buy 10 airliners this year, but the airline can only afford 1 because you competed very well on its routes, why should it buy 10?
Ok, you say it should take a loan, but it can't earn enough money to repay the loan.
And then comes the next order that it can't afford.

This either makes it very easy to defeat AI, because it puts itself in an incredible debt and thus it's game over for the AI.
Or it makes it impossible to defeat AI, as it gets the planes for free..


I really think we shouldn't tell the airline at all when it should buy how many airliners.
The airline should feel its economic environment and adjust to it.

It looks at its preferred routes, checks the distance, demand and the optimized frequency and then checks what airliners are best for that mission.
This will give a much more organic feel to the game as the airline won't always do the same.
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)