August 29, 2026

Color naming game in python

 

To demonstrate grounded language an interactive dialogue with a chatbot is a good starting point. In a minimal example the dialogue is about a 4x4 grid in which colored objects are visible. After entering a keyword "green triangle" the AI in the game highlights all the found objects. The user can also ask for a column with "col2".

The parser in the software analyzes the input, matches the request with the current game state and responds with a text on the command line and the highlighted objects.


The limitation of the AI is located in the amount of words. The current parser understands only simple words like "row1, col2, green, red, blue, triangle, circle, rectangle". Spatial commands like "left, right" are missing. So its not possible to enter a command like "left col2 row2", the AI doesn't understand that the user is referencing to the object left from col2/row2. Also more advanced color names like "light blue, dark brown" and so on are also missing.

The discourse is restricted to the previously mentioned basic vocabulary which. The advantage is that this restriction allows to limit the lines of code for the software to only 250.

No comments:

Post a Comment